Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have set the following expression:
(
Sum({<Month={'$(=Max([Month], 'YYYY-MM'))'}>} Revenue)
/
Sum({<Month={'44927'}>} Revenue)
)
-1
where {<Month={'$(=Max([Month], 'YYYY-MM'))'}>} is Current Month
How can I set a similar expression for calculating Previous Month? I tried this but it doesn't work:
{<Month={'$(=Max([Month]-1, 'YYYY-MM'))'}>}
In addition, when I used this format
(Sum({<[Month Year]={'$(=Max(Date([Month Year], 'YYYY-MM')))'}>} USD_Revenue) / Sum({<[Month Year]={'$(=Max(Date([Month Year]-1, 'YYYY-MM')))'}>} USD_Revenue)) -1
both months format returned in YYYY-MM i.e. 2023-02 and 2023-01, but the calculation is still not returning properly