jnikodym
asked on
Crystal Reports - Running Total Percentage
I have a report that i have grouped by month. I have subtotals for each month. I need to calculate a percentage for each month based on the total for the entire report. So, if i had 12 months on my report, i need to know what percent of the total for each month.
ASKER
I have a running total setup to reset on each month. The report is grouped by month. I don't understand what you are suggesting?
Why are you using a running total?
Have you considered using a Cross Tab?
mlmcc
Have you considered using a Cross Tab?
mlmcc
ASKER
I've just always used running totals to total up data for each group. I've never used cross tab's.
Are you adding all values or is there a formula that controls the evaluation of the running total?
You can use Sum({YouRField}) as the divisor to get the %
mlmcc
You can use Sum({YouRField}) as the divisor to get the %
mlmcc
ASKER
I have two groups on my report, so it looks like this
January 2011
High Prob
Data Line 1
Data Line 2
Data Line 3
Medium Prob
Data Line 4
Data Line 5
Data Line 6
Low Prob
Data Line 7
Data Line 8
Data Line 9
February 2011
High Prob
Data Line 10
Data Line 11
Data Line 12
Medium Prob
Data Line 13
Data Line 14
Data Line 15
Low Prob
Data Line 16
Data Line 17
Data Line 18
So, I want to total each probability group. I then want to show a percentage of each group compared to the total for that particular month.
January 2011
High Prob
Data Line 1
Data Line 2
Data Line 3
Medium Prob
Data Line 4
Data Line 5
Data Line 6
Low Prob
Data Line 7
Data Line 8
Data Line 9
February 2011
High Prob
Data Line 10
Data Line 11
Data Line 12
Medium Prob
Data Line 13
Data Line 14
Data Line 15
Low Prob
Data Line 16
Data Line 17
Data Line 18
So, I want to total each probability group. I then want to show a percentage of each group compared to the total for that particular month.
I believe it would be:
IF sum(YourField) = 0 then 0
ELSE
sum (YourField, ProbabilityGroup) % sum(YourField)
Replace YourField and ProbabilityGroup with the correct formula or fields used in your report.
IF sum(YourField) = 0 then 0
ELSE
sum (YourField, ProbabilityGroup) % sum(YourField)
Replace YourField and ProbabilityGroup with the correct formula or fields used in your report.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you GJParker, that worked great.
How are you getting the monthly totals?
mlmcc