Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
MVP
MVP

Re: Lag function

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

5 Replies
MVP
MVP

Re: Lag function

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

sujeetsingh
Honored Contributor III

Re: Lag function

Andrew ,

first of all you can compare it in Charts

Re: Lag function

Hi

Try like this

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

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

suniljain
Honored Contributor

Re: Lag function

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

Re: Lag function

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

Community Browser