4 Replies Latest reply: Mar 5, 2015 2:26 PM by Marco Puccetti

# Rangesum Before

Can you explain me the use of rangesum(before()) statement in a pivot table like this:

Tabella
ValuePerc
numberPercent of increment
ValuePerc
NumberPercent of increment

with this formula:

(sum(N_REC)-rangesum(before(sum(N_REC),1,1)))

The formula would compute the increment percentage of the number value related to the Data newer Value number, but i can't understand the meaning.

Can

Thank you

• ###### Re: Rangesum Before

The rangesum does not do anything. before(sum(N_REC),1,1) gets the value of the previous column. The default of the before function is 1 for offset and 1 for number of records. So before(sum(N_REC)) returns the same value as before(sum(N_REC),1,1).

• ###### Re: Rangesum Before

So to get the sum of the column Value (Data Older) for the column Value (Data newer) is it correct to use 1?

There are 2 columns from column Value (Data Older) to the column Value (Data newer), isn't it?

Thanks!

• ###### Re: Rangesum Before

Yes. The expression should work.

• ###### Re: Rangesum Before

With 1 or 2? There are 2 columns from column Value (Data Older) to the column Value (Data newer), isn't it?

I expect that it would be used 2 instead of 1 or no?

Can you write me an example to take these values:

Sum (A),

Sum(C)-Sum(A) with before

and the same for  B and D columns?

Tabella