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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

Reference previous value in straight table

Hi All,

I know of Peek() and Previous() in the script, but can you use similar functionality in charts and tables?

i.e. I want to use a previous value in a table, but this value is created from different sources and can't be done in the script, the end result should look like this:

DateValueCombined (Value + Previous Combined)
01/01/2018100100
02/01/2018100200
03/01/201850250
04/01/201860310
...

The idea is, that I can then do an average of this value, but always including the value from the row before.

Previous seems right, but I gather this is only for script and based on ordered data. Any suggestions you can offer would be appreciated.

Kind Regards,

Dayna

1 Solution

Accepted Solutions
sunny_talwar

You can use Missing Manual - Above() and Below()

For your specific question, you cna try like this

RangeSum(Above(Sum(Value), 0, RowNo()))

Also, look here

Calculating rolling n-period totals, averages or other aggregations

View solution in original post

3 Replies
sunny_talwar

You can use Missing Manual - Above() and Below()

For your specific question, you cna try like this

RangeSum(Above(Sum(Value), 0, RowNo()))

Also, look here

Calculating rolling n-period totals, averages or other aggregations

niclaz79
Partner - Creator III
Partner - Creator III

Hi,

As described above the Above and Below functions do the same as Previous and Peek.

Worth to mention is if you have a pivot with some dimensions as columns, you use the Before and After functions instead to move left or right in the table.

Dayna
Creator II
Creator II
Author

Thanks all!!