Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD vs Prvious YTD -1 avoiding Date selected list

hello ,

I managed to set up the set analysis expression  that generates the sum of the YTD and the YTD-1 from MAX  the month loaded data and I founf my solution of the YTD.

For the Previous YTD ( YTD -1 ) , I found the expression But the problem is that by selecting many months(MMMYYYY) in the list, it takes All months slected  !!

Set analysis expression :

=Sum({<Date={">=$(=Yearstart(addyears(max(Date),-1)))<=$(=addyears(max(Date),-1))"},YYYY=,MMMYYYY=,

[PPW]={'PUDY','PTD452'}>}(Sales))

thanks .

1 Reply
stigchel
Partner - Master
Partner - Master

The max date in the set analysis is the max Date with the current selections. If you want the max date regardless of selections use

max({1} Date)


or when you only want to disregard the selections in YYYY and MMMYYYY use


max({<YYYY=,MMMYYYY=>} Date)