Calculate percentage in query

barkarlo

Registered User.
Local time
Today, 13:42
Joined
Feb 11, 2013
Messages
46
How to calculate the percentage of kilometers per order compared to the total number of kilometers per carrier.
In the attached screenshot send queries where I need formula.
Mileage on the orders of the field called "Korkma" . The formula should look like: # [Korkm] / [total kilometers per carrier] #.
I do not know how to get the total mileage driven by the carrier (the carrier is in the query in the Field Name Plate) for the month.
For example: date 1.1.2013.,Plate:Pribus Korkm= 37
date 2.1.2013.,Plate: Pribus,Korkm=56
date 10.1.2013.,Plate: Pribus, Korkm= 70
Formula: [37]/[163] = 0,23
[56]/[163]= 0,34
[70]/[163]= 0,43
 

Attachments

  • How to calculate of costs.jpg
    How to calculate of costs.jpg
    107.8 KB · Views: 303
Hmmm.... that sounds interesting, because you are trying to query in two directions, first of all making a sum of all the km driven by one carrier in one given month, then unfolding the data again to compare line by line to this sum.

As far as I know that cries out for a nested query.

Query number one only has three fields, one which takes the month and year out of the field with the date in it (date) and gathers all the same data in one line, one field which contains the carrier (Plate) and gathers the same data in one line and the last field is the mileage (Korkm) and sums up the kilometres.

Let me sleep on the idea of how to read this information in another query.

Or maybe someone else has already woken up. :-)

Carol
 

Users who are viewing this thread

Back
Top Bottom