Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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)