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: 
Anonymous
Not applicable

Use of before or after function

Hi

I have a pivot table looking like this:

Area201206 201205201204
North93,495,294,7
South92,995,194,9
East93,193,994,5

I now need to add a collumn for each period where I calculate the differense in Index form last period

Area12012062 201205 201204

indexdiffindexdiffindex
North93,4- 1,895,20,594,7
South92,9- 2,295,10,294,9
East93,1-0,893,9-0,694,5






I tried this

=Rangesum(before(column(1),0,(RowNo()+1)))

But this one accumulates values. Tried to alter different parts of it, bus since I do not fully understand what is going on in this formula, I`m just guessing. Wit no luck so far.

Any ideas?

BR

Dan

Labels (1)
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens
Support
Support

Hi Dan,

The diff expression should be

[index] - After([index])

Using [index] to refer to the name of the expression.

Hope that helps.

Miguel

View solution in original post

2 Replies
Miguel_Angel_Baeyens
Support
Support

Hi Dan,

The diff expression should be

[index] - After([index])

Using [index] to refer to the name of the expression.

Hope that helps.

Miguel

Anonymous
Not applicable
Author

Hi Miguel

Simplicity.

Solves my problem.

Thanks!

BR

Dan