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: 
Qlik_UserEM
Contributor
Contributor

Set Analysis - YTD For Prior Year

Hello,

I am trying to created a dynamic YTD sales calculation through the prior full month based on a Year-Month selection.

I am able to do this for all months except January. If I select January, I would like it to show the entire prior full year.

I have this formula, but when January is selected, it just shows 0

SUM({<Year={'$(vPriorYear)'},%DATE_KEY={"<=Date(MonthStart(Min([%DATE_KEY]))-1)"},Month=,[Year-Month]=>}Sales)

%DATE_KEY = sales order date

vPriorYear = 2020

What am I doing wrong here?

0 Replies