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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Before function with variable in pivot

I'm trying to use the before function with a variable in a pivot and can't get it to work as wanted. What I wan't to do is to calculate one of the rows from the previous column data.

In the first two columns it works but then onwards, when the calculated values should change, it still uses the static variable value.

Here is the calculation used:


if( ColumnNo( )=1, $(variable), (before($variable) + before(sum(Something)))


Please see attached file for further explanation. Is there another function to use or any work around ?

/Michael

0 Replies