Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to pull YTD from a previous year (2021) now that we have transitioned into the new year. Previously, this is the expression I always used:
Sum( {$<IsInYTD={1},[Restated POS Year] = {$(=Max([Restated POS Year]))}>} [Retail Sales Dollars])
Is there a simple change I can make to this formula in order to still get full YTD 2021 data for this particular set or will I have to change more in the script itself?
Thanks in advance!
Your formula is still valid for Current YTD, for Previous YTD (PYTD) you need to create a new one:
1. Assuming that the values for Restated POS Year are all years, you will need to decrease in 1 the max year:
$(=Max([Restated POS Year])-1)
2. Optionally In script, create a new Flag IsInPTYD (is in Previous Year To Date) with value 1 for 2021 and 0 for current year and the rest of the years, or just remove that part from Set Analysis formula.
Final version of formula with suggested changes:
Sum( {$<IsInPYTD={1},[Restated POS Year] = {$(=Max([Restated POS Year])-1)}>} [Retail Sales Dollars])
Regards.