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

Autocalendar | Previous YTD

Hello all,
I'm tying to achieve a Previous YTD measure using autocalendar. Is this possible?

I'm using the below, but the incorrect result is returned (0).

SUM({<[Date.autoCalendar.InYTD]={1},[Date.autoCalendar.YearsAgo]={1} [Sales])

Thanks
1 Reply
sunny_talwar
MVP
MVP

What does your derived calendar script look like? Is it assigning 1 for true or -1?

Capture.PNG

If it is -1, then try this

Sum({<[Date.autoCalendar.InYTD]={'-1'},[Date.autoCalendar.YearsAgo]={'-1'} [Sales])