Forum Discussion
Anonymous
6 years agoNot applicable
calculate rolling over
Hello, Hope anyone can help? I need to create a new measure to calculate the rolling leavers for a period of time. I have the number of leavers on a monthly basis but not sure how to create a fo...
- 6 years ago
Anonymous ,
Try like
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH))
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-12,MONTH))
Greg_Deckler
6 years agoCommunity Champion
So if you have a separate date table, you could use time intelligence functions lat TOTALYTD for example.
Also see if my Time Intelligence the Hard Way provides a way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008