Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate last year data - for each month separately (and ideally for totals). Like in pivot below:
I use addMonths function but it won't work.
My formula is:
sum({<POS_Month= {'$(vPOS_LY)'}>} Sell_Out)
where:
vPOS_LY: =date(addMonths(POS_Month,-12), 'YYYY-MM')
any ideas where I am wrong?
Addmonth() is expecting a date. maybe try like this.
Date(AddMonths(POS_DATE,-12), 'YYYY-MM')
Date(AddMonths(MakeDate(POS_YEAR, POS_MONTH, 1),-12), 'YYYY-MM')
Try this
Before(Sum({<POS_Month>}Sell_Out), 12) * Avg(1)
your're right Sunny, as always. Thank you!