Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
hansvillo
Contributor III
Contributor III

KPI when selection vs selection -1 year

Hello,

I have a KPI with two measures. The first measure is:

if(GetSelectedCount(MonthYear) = 0, count({<RY = {'1'}>}DISTINCT _Debtor) , count(DISTINCT _Debtor))

The second:

if(GetSelectedCount(MonthYear) = 0, count({<LRY = {'1'}>}DISTINCT _Debtor) , count(DISTINCT _Debtor))

 

So by default, the KPI show Rolling year vs Last Rolling Year. In Red is when you make a selection on Monthyear.

Now: When I Select May-2019

The first measure is showing 2k and the second shows 2k also.

I want the second measure to show the selected date -1 year. Somehow I don't get it right. (and I think its simple 🙂 )

 

Does someone know the answer? Thx

Labels (2)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Second Measure

if(GetSelectedCount(MonthYear) = 0, count({<LRY = {'1'}>}DISTINCT _Debtor) , count({<Month_Year = {"$(=AddYears(Max(Month_Year),-1))"}>} DISTINCT _Debtor))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

Second Measure

if(GetSelectedCount(MonthYear) = 0, count({<LRY = {'1'}>}DISTINCT _Debtor) , count({<Month_Year = {"$(=AddYears(Max(Month_Year),-1))"}>} DISTINCT _Debtor))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful