Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
giasult
Contributor
Contributor

YTD based on Year selection

Hi all,

I have problem and hoping to get a support here. In Qlik Sense app I am showing PY YTD and FY YTD. Is somehow possible to show YTD based on Year selection from the drop down menu? I am using YTD flag defined in the master calender: YearToDate([$1],0,10) as CurYTDFlag, YearToDate([$1],-1,10) as LastYTDFlag. Year selection is done with the UserYear variable : =if(getselectedcount(UserYear)=1,only(UserYear),Dual('FY'&Right(Year(AddMonths(Today(),3)),2),YearStart(AddMonths(Today(),3)))), where UserYear is extracted as following:

 

Years:

 

Load Distinct

Dual('FY'&Right(Year(AddMonths(Date,3)),2),YearStart(AddMonths(Date,3))) as UserYear

Resident Actuals;

 

what would be expression in the chart for PY YTD and FY YTD?

Labels (1)
1 Reply