Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have set up 12 date period dimensions using the below calculation: (Month_ is my date field which is Month/Year)
addmonths(date#(Month_,'MMMM YYYY'),-0) - This is for current month ([Period 1])
addmonths(date#(Month_,'MMMM YYYY'),-1) - This is for previous Month ([Period 2])
addmonths(date#(Month_,'MMMM YYYY'),-2) - ([Period 3]) etc....
Now I want to SUM [Net Revenue] by each date dimension so I will have 12 [Net Revenue] calculations which will be dependent on what is selected on the [Month_] filter.
My calculation for this is: Sum({<Month_={'$=[Period 1]'}>}[Net Revenue])
This is not working. Output for this is 0 however if I add 'January 2019' instead of [Period 1] it works fine
Sum({<Month_={'January 2019'}>}[Net Revenue].
Any help with this would be appreciated.
Thank you.
Sum({<Month_={"$(=addmonths(date#(Month_,'MMMM YYYY'),-0))"}>}[Net Revenue])
Worked perfectly.
Thank you so much 🙂