Topic: Need help with summary/group calculation Posted: 09 Apr 2009 at 12:02pm
This is probably simple, but I have a report with line-item sales data
that is totaled/grouped by item, by customer, by sales rep. The columns
are 2008 sales and 2009 sales. I need to calculate the % change from 08
to 09 for each summary group. Like this:
I have the formula to do the calculation but I'm not sure how to create
the field for each group footer to do the calculation. I've tried it as
a formula field and a SQL field and I can't get it. I'm using CR v10.
Thanks.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 10 Apr 2009 at 6:19am
You would need a formula for each grouping, at least that is how I would do it...
Since you are summing in the footer, and I am hoping that there are no items that are being skipped via a suppression formula something like this shoud work:
The basic calculation I'm doing is (SUM09 - SUM08) / SUM08 * 100 to get the %Diff, however I do have some customers that have 0 sales for 08 and I anticipate getting the infamous "division by 0" message. I'm just not sure how to incorporate a condition that says if SUM08 = 0, then %Diff = 0, else (..above calculation..)
If I keep the "formula =" in the formula field then I get an error at the IF statement. If I remove the "formula =" then I get an error at the "0" after the THEN statement (says a statement is expected?).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum