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: 
hansdevr
Creator III
Creator III

InYearToDate function - can it be used within Set Analysis

Dear Specialists,

 

To determine YTD sums, up to now I used

sum ({$<Boekdatum = {"<=$(=Max(Boekdatum))>=$(=Yearstart(Max(Boekdatum)))"}>}Betalingen)

Is there some way of incorporating the InYearToDate() function, so I can easily compare the YTD sum with same sum in previous book year (up till Max(Boekdatum)-1 year)?

 

Help would be much appreciated!

Regards,

Hans

Labels (2)
2 Replies
sunny_talwar

Have you tried this for the previous year?

Sum({$<Boekdatum = {">=$(=YearStart(Max(Boekdatum), -1))<=$(=AddYears(Max(Boekdatum), -1))"}>} Betalingen)
hopkinsc
Partner - Specialist III
Partner - Specialist III

Hi Hans,

 

You can use InYearToDate() in set analysis like this..

{< Boekdatum = {"=InYearToDate(Boekdatum, Today(), 0)", "=InYearToDate(Boekdatum, Today(), -1)"} >}

Does that help?