Calculation across Row Group
I have a report with one element I cannot get to work correctly. It groups by date in the columns and zipcode in rows. It shows a count and sum of weight per date/zip. All nice and simple. The last column needs to be a % of how many days of the date range the weight for an individual zipcode was >= 10 lbs. The date range is always 5 days. It's easy to write expressions that sum the weight and set a value if it's >= 10, but I can't for the life of me find a way to have these calculate in a total for the row. It would look like the PERCENT column below. 12/1/2010 12/2/2010 12/3/2010 12/4/2010 12/5/2010 Zip Code PCS LBS PCS LBS PCS LBS PCS LBS PCS LBS PERCENT 30004 2 8 0 0 4 13 6 18 3 9 40% 30005 4 11 3 10 2 8 6 15 0 0 60% 30012 3 10 6 14 4 11 6 12 4 12 100% Most recently I tried a running value but it always summed down the rows as opposed to across the columns. Despite the fact that I set the scope to the column group. Even if a running value can work here, I would need hide the column for all but the last one. =RunningValue(IIf(sum(Fields!weight.Value)>=10,20,0),Sum,"groupdate") I've tried so many different approaches on this and have hit a wall. Has anyone had to do something similar and figured out a good approach? Thanks
December 14th, 2010 6:14pm

Try writing an expression similar to SUM(IIF(Fields!weight.Value >= 10, 1, 0))/Datediff("d", StartDate, EndDate) (or hardcoded value = 5) This should give you the desired output. Regards, Arvind Tat Tvam Asi
Free Windows Admin Tool Kit Click here and download it now
December 14th, 2010 8:07pm

I guess Arvind's suggestion is spot on. Conditional sum as shown above does the trick. Please make sure you set the format of the textbox that displays the computed value to P or 0.00 % regards Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
December 14th, 2010 11:28pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics