Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can anyone tell me how to calculate privious 12 months sales in script.
You're going to have to be a bit more specific if you want any help with this...
Kushal,
When creating my calendar table in my script, I usually have a line like this that creates a flag.
IF(TempDate >=ADDMONTHS(MonthStart($(varToday)),-11),1,0) AS Current12MonthFlag,
Then you can use set analysis to only pull sales for that flag:
SUM({<Current12MonthFlag={1}>}Sales)
Hope this helps!