Forum Discussion
Rolling 12 Month From Today
Hi Everyone,
Can't believe I get bogged down by such an easy question, just couldn't get my head around.
My task is easy, to calculate the total sales of the last 12 months, which means total sales from 5th Apr 2018 to 4th Apr 2019 if we are looking at today.
My DAX doesn't work,
Last 12 Months Sales = CALCULATE(SUM('Sales'[Amount]), DATESBETWEEN('Sales'[Invoice Date], TODAY(), DATEADD(TODAY(), -1, YEAR)))
I know I can achieve the same result by using the relative date filter but since there is other sales value to be present in the same visual, I do need to do this by DAX.
Thanks everyone!
Hi Penn ,
Here you should create a CALENDAR table to work on it. Hope this third -party blog could help you.
If it doesn't meet your requirement, kindly share your sample data and excepted result to me. Please upload your files to One Drive and share the link here.
2 Replies
- v-frfei-msft
Community Support
Hi Penn ,
Here you should create a CALENDAR table to work on it. Hope this third -party blog could help you.
If it doesn't meet your requirement, kindly share your sample data and excepted result to me. Please upload your files to One Drive and share the link here.
- Penn
Resolver I
Still working on this