Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Odd behaviour with rangesum(before(sum function in pivot chart.

Having difficulties with this formula, no matter how simple I make it.  Basically I'm dealing with financial data, where a field needs to represent a running sum (aggregated to the field value to the left of it, for the previous fiscal period).

When I isolate just a single row of data, the aggregated sums are represented correctly.

But when I have multiple rows (ie. separate balance sheet items), the formula doesn't consistently add to the previous - before - value, but seems to sometimes reset along the way.

Simple example that I'm using that shows this issue: =rangesum(before(sum(Budget),0,ColumnNo()))

Anyone run into a similar issue?  I must be doing something wrong here.

Thanks,

Matt

7 Replies
Gysbert_Wassenaar

Try =rangesum(before(sum(Budget),0,ColumnNo(TOTAL)))


talk is cheap, supply exceeds demand
sunny_talwar

Do we need another TOTAL?

=RangeSum(Before(TOTAL Sum(Budget), 0, ColumnNo(TOTAL)))

Gysbert_Wassenaar

Probably, good call.


talk is cheap, supply exceeds demand
Not applicable
Author

I've tried both of your suggestions and the values shown are consistent with what they were before (incorrect when multiple rows are showing).

sunny_talwar

Would you be able to share a sample or some screenshots? We might be missing something here

Not applicable
Author

correct (isolated selection).png

This is correct (isolated a single IncomeGroup). 

incorrect.png

This is the same incomegroup shown without being filtered out, showing the same periods.  Note I have the same issue for both Income and Budget expressions.

sunny_talwar

Are you using if statements or set analysis in your expression to restrict something? I am not 100% sure what might be going on here....