View Full Version : Getting a percentage


Actual Reality
11-14-2007, 07:00 AM
Ok here goes, my 1st post..........

I have written a database in Access '03, which books customer orders on, and then the same database is used by the guys in logistics to input their Tracking numbers from DHL/UPS/TNT etc etc.

That bit is working fine -

The problem i have is that to show on screen or on a report, if an order is either early or late, which i have done using iif statements.

I have 2 fields that are calculated by iif statements, one which gives a + or - figure if the order is early or late and another one that states "On Time" or "Late".

What i want to do is count the amount of "On Time" or "Late" and then spit that data into a chart or a report that gives percentages. Problem is of course with the 2 fields being so volatile and can change if a date is changed, the contents of the calculated fields will not stay - if for example i do a simple report with just a pie chart on it, i get the chart filled at 100% which given the data input is incorrect.

I know its not very well explained, but any help would be gratefuly appreciated!

Regards
Darren

KenHigg
11-14-2007, 07:16 AM
One way I have done this in the past is to create two columns. In col 1, using iif(), put a 1 if the ship is on time and a zero otherwise. In the other col do the same if the ship is on time. Then you can do a count on each col.

???
ken