Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to write an expression that will show the previous month's data of sales.
I have been able to use this formula to show the previous years sales in another table
Sum({<Year={'$(=Year(Today())-1)'}>}Sales)
But when I replace Year with Month it does not bring back any values.
Thanks for helping!
Create a new field in the script like this
LOAD Date,
Year(Date) as Year,
Month(Date) as Month,
Date(MonthStart(Date), 'MMMYYYY') as MonthYear
FROM ...
And then try this
Sum({<MonthYear={"$(=Date(MonthStart(Max(MonthYear), -1), 'MMMYYYY'))"}, Year, Month>}Sales)