Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Rangesum Before

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

Tabella
Data olderData newer
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

Labels (1)
4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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).


talk is cheap, supply exceeds demand
marco_puccetti
Partner - Creator
Partner - Creator
Author

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!

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes. The expression should work.


talk is cheap, supply exceeds demand
marco_puccetti
Partner - Creator
Partner - Creator
Author

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
Data olderData newer
AB
numberPercent of increment
CD
NumberPercent of increment

Thanks!