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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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 .

Labels (1)
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)