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: 
debmsarkar123
Contributor III
Contributor III

Dimension vs Current Selections in YTD, MTD

We have a standard YTD expression-

sum({<date=,Year=,Month=,Quarter=, date={">=$(=YearStart(Max(date)))<=$(=Max(date))"}>}Sales)

 

which is for sum of sales. 

My doubt was that we have put date=, which means qlik has to ignore any current selections of Date.

Then later on we are calculating a range of date as in  date={">=$(=YearStart(Max(date)))<=$(=Max(date)) 

this part of the expression.

So if qlik has to ignore the selection of date, how can it calculate YTD since YTD needs a starting date, for example for 14-02-2022 , YTD would be sum of sales from Jan -22 to 14th Feb 2022.

Labels (3)
1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The date= modifier applies to the Sum(Sales).  There is no set modifier in the Max(date) expression, hence Max(date) will operate on the current selections.

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com