Percentages of subtotal in crosstab query

jobrien4

Registered User.
Local time
Yesterday, 20:49
Joined
Sep 12, 2011
Messages
51
I have Access 2010 and am trying to create a cross tab query that will display the percentage of the subtotal as the values.

For instance:
Current Late Default
A 8 1 1
B 15 3 2
C 40 8 2

Current Late Default
A .80 .10 .10
B .75 .15 .20
C .80 .16 .04

How can I do this?
 
You could create a query that returns the fractional values by dividing each field by the total of all the fields, then use that query as the basis for your crosstab. If any of the underlying fields can be Null or zero you'll need to trap for that. For example;

CurrentPercent:IIf(Nz([Current], 0)<>0, [Current]/([Current]+Nz([Late],0)+Nz([Default],0)),[Current])
 

Users who are viewing this thread

Back
Top Bottom