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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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 (3)
2 Replies
sunny_talwar
MVP
MVP

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?