Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
New-Qlik
Creator II
Creator II

Fiscal Year issue

Hi,

I have an KPI showing sum of Current Fiscal Year Sales .

Fiscal year column have data for FY 2021, FY2020 , FY2019 etc

For KPI I want Sum(Sales) for FY 2019.

I have created a variable 

LET vCnFY = PEEK('Fiscal Year', 0 ,'Calendar');

and vCnFY gives me 2019 and KPI shows correct data .

But if I select FY2018 KPI still shows for FY2019. So KPI is not changing with filter selection

KPI expression looks like this : Sum({$<[Fiscal Year ]={'$(vCnFY )'}>}Sales)

I cannot use Max function because it will show me FY2021 data in KPI.

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

>>I cannot use Max function because it will show me FY2021 data in KPI.

Not true. If you select FY2018, then the max, if defined correctly, will be 2018.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Silambarasan1306
Creator III
Creator III

You can create a variable, vMaxYear - If(GetSelectedCount([Fiscal year])=1,Max([Fiscal year]),$(vCnFY)) Then use this variable in the expression, Sum({$<[Fiscal Year ]={'$(vMaxYear)'}>}Sales)