Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
s_gorgo
Contributor II
Contributor II

QlikSense - KPI with value of previus row of the table (MovePrevius?)

Hi everyone,

i apologize for my bad english... I promise thah I will improve it

I'd like to insert in my app a KPI with two measures:

1) count(distinct(name_field))

2) difference between count distinct name_field in the selected date and previus date

The problem is that previus date isn't date-1 because there are dates without data. I must find the value of the previus row of my table (in this case an xls file).

Can you help me please?

Thanks!!!!

1 Reply
ruanhaese
Partner - Creator II
Partner - Creator II

Youve got 2 options do this,

1) Create a variable that will get you the previous date

Create another variable / or in the KPI use Set analysis to derive the count on the previous date

I.e. In this scenario you would use the FirstSortedValue ( DateKey, DateKey, 2)

to get the next value, insert it into a variable

then use another variable to calculate the count( {< DateKey={"$(variable)"} >} name_field)

2) When Loading in the back script, add a field that finds the previous value.

I.e. In this scenario you would use the "Previous" function in the load script, run through the table

sorting by "theDate" field.