Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
TinaHensel
Contributor III
Contributor III

Get Last Sorted Value of Difference Modifier as KPI

Hello together,

I am struggling on the following issue. Lets say I have a dimension month and measure counter being a difference modifier including rangesum with:

 

RangeSum
(
  Above(( 
     count(distinct USER_ID)  
     - 
     Above((count(distinct USER_ID)))) 
, 0, RowNo()))

 

This lead s to the following result:

TinaHensel_0-1631865645417.png

Now I ust want the value "-5" being displayed in a KPI chart. How is this possible?

Thank you very much!

 

Best regards

Tina

 

1 Solution

Accepted Solutions
rubenmarin

Hi, if -5 is the difference since the first month to the last you can do:

Count({<monat={$(=Max(monat))}>}distinct USER_ID)-Count({<monat={$(=Min(monat))}>}distinct USER_ID)

 

View solution in original post

2 Replies
rubenmarin

Hi, if -5 is the difference since the first month to the last you can do:

Count({<monat={$(=Max(monat))}>}distinct USER_ID)-Count({<monat={$(=Min(monat))}>}distinct USER_ID)

 

Kushal_Chawda

@TinaHensel  If your expression really gives you difference between current and first Month of the time then you can simplify your expression as below instead of using complex rangesum and above logic

=Count(distinct USER_ID)- Count(total {<monat={"$(=min(monat))"}>} distinct USER_ID)