Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

fosterma
New Contributor II

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
Tags (2)
1 Reply
MVP
MVP

Re: Autocalendar | Previous YTD

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])