[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# average on crystal report with 3 groupings

Posted on 2009-12-22
Medium Priority
241 Views
Hi,

I have a Crystal Report with 2 groupings I want to to calculate the percentage.  I having difficulty with setting up the running total with avg.

The field is a formula.

So here is the organization of the report:

Operational
acct-type Revenue
deptid
acct-type Expense
deptid
acct-type Captial
deptid
Projects

acct-type Revenu
deptid
acct-type Expense
depid
acct -type Capital
deptid

I would like the avg formula to calculate on the deptid
avg formula is :  actuals/ytd amt
How do I set up the running total wizard?

Thanks,
Lucy

using crystal 9.0

0
Question by:Lucia
• 3

LVL 101

Expert Comment

ID: 26106159
Can you use the summary functions rather than a running total?
Right click the field
Click INSERT --> SUMMARY

You can set the running totals up to reset on change of a group

mlmcc
0

LVL 13

Accepted Solution

PCIIain earned 2000 total points
ID: 26106420
Average in both summary and running total is an average of a single field.

I believe that what you want is a formula which reads.

if(sum({ytd amt},{deptid) <> 0)then
sum({actuals},{deptid})/sum({ytd amt},{deptid})
0

Author Comment

ID: 26106557
So,

Sum ({NC_BUDGET_SUM_LNS.NC_YTD_BUDG_YR_CUR}, {NC_BUDGET_SUM_LNS.DEPTID})<>0 THEN

Sum ({NC_BUDGET_SUM_LNS.NC_ACTL_DEC_BUDG}, {NC_BUDGET_SUM_LNS.DEPTID})/Sum ({NC_BUDGET_SUM_LNS.NC_YTD_BUDG_YR_CUR}, {NC_BUDGET_SUM_LNS.DEPTID})

But it is not caculating properly on the group dept:

example:

409,017/554,286   is not equal to 1.

I put the formula at the deptid footer.

Thank you,
Lucy

0

Author Comment

ID: 26106569
ok I multiplied by 100 and now it is happy.  Please don't close yet I need to do it on the next grouping.

I am loosing my mind :-)
0

Author Closing Comment

ID: 31669031
Thank you all for assisting.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…