Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to created a dynamic YTD sales calculation through the prior full month based on a Year-Month selection.
I currently have this formula, however, when I select 2021-May it is still showing the sales for May as well:
SUM({<Year={'$(vMaxYear)'},%DATE_KEY={'<$(vMaxMonthStart)'},Month=,%DATE_KEY=,[Year-Month]=>}Sales)
%DATE_KEY = sales order date
vMaxYear = current year (2021)
vMaxMonthStart = start of the max month (5/1/2021)
What am I doing wrong?
Hi @Qlik_UserEM, I am seeing a couple of things to check:
You can try:
SUM({<Year={'$(vMaxYear)'},%DATE_KEY={"<$(vMaxMonthStart)"},Month=,[Year-Month]=>}Sales)
And sometimes the date format can make your filter not work, so you can also try Date(vMaxMonthStart, 'MM/DD/YYYY') (use your default date format) instead of vMaxMonthStart as a second try.
JG
Hi @Qlik_UserEM, I am seeing a couple of things to check:
You can try:
SUM({<Year={'$(vMaxYear)'},%DATE_KEY={"<$(vMaxMonthStart)"},Month=,[Year-Month]=>}Sales)
And sometimes the date format can make your filter not work, so you can also try Date(vMaxMonthStart, 'MM/DD/YYYY') (use your default date format) instead of vMaxMonthStart as a second try.
JG
Thank you, this worked perfectly.