Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Lag function

I'm new to Qlikview and have a specific problem that highlights a broader issue that I'm not sure about yet.

The problem is whether it is possible to use lag values in a straight table i.e.  To create the following:

MonthSum(Value)Lag SUM(Value)
Januarya-
Februaryba
Marchcb
Aprildc

My ultimate aim is to be able to create a column where I compare the Value with the lag value, but I want to get there in stages.

One solution would be to create another column as I load the data. But is that the best way of doing it? If the dataset were large it would slow down loading. In this situation the data is small, but I often work with big datasets.

Any help would be much appreciated.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Use above() function, like:  =Above(Sum(Value))             // this should be the expression for your lag column

View solution in original post

5 Replies
tresesco
MVP
MVP

Use above() function, like:  =Above(Sum(Value))             // this should be the expression for your lag column

sujeetsingh
Master III
Master III

Andrew ,

first of all you can compare it in Charts

MayilVahanan

Hi

Try like this

=Above(Sum(Sales)) <- Lag level.

=Below(Sum(Sales)) <- Lead level.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
suniljain
Master
Master

You can use

above()

it will returns the value of expression evaluated with the chart's dimension values as they appear on the row above the current row within a column segment in a table or, in the case of bitmap charts, in the chart's straight table equivalent

Not applicable
Author

Thanks for your replies - I got the Above() function working... I knew it must be possible