Cummulative Sum

Hi All,

I used Running Sum to calculate cumulative sum of number of bills, but the used formula gives me incorrect sum.

Formula Used: =RunningSum([No of Bills];([Meter Size]))

The formula used is taking precedence on Number of bills (For Ex: The attached report has Number of bills as “1”, “2” and “4” based on consumption level. But, the formula is cummulating all the bills of “1” first and cummulating of “2” as second and “4” as third)

I have to show cumulative no of bills based on consumption level (Attached file has mock-up calculation which i manually added for better understanding).

The report has secitons on Rate Code, Customer Type and Meter size.

Appreciate your suggestions.
Report.xls (28.0 KB)


Praveen8367 (BOB member since 2010-11-27)

could you just use =RunningSum([No of Bills])


erik.stenson :us: (BOB member since 2012-07-30)

Hi Erik,

I tried using =RunningSum([No of Bills]), but no luck…


Praveen8367 (BOB member since 2010-11-27)

Try using Foreach function also in your formula.

as like eg;

=runningsum(amount) foreach (customer)


BO47 (BOB member since 2010-02-18)

is that object you’re trying to sum a dimension or a measure? because looking at that data something doesn’t automatically make sense to me. one or more of those columns with numbers inside must be a dimension and not a measure. maybe that’s what the problem is.


erik.stenson :us: (BOB member since 2012-07-30)

Erik,

Number of Bills is a dimension. But, I create a new (measure) object for bills taking (Number of Bills) dimension object.

Thanks,
Praveen


Praveen8367 (BOB member since 2010-11-27)

yes you would need to change the number of bills to a measure and do a running sum on the measure


erik.stenson :us: (BOB member since 2012-07-30)