Forum Discussion
Rolling 12 month - previous year
Hi, I can get Rolling 12 month sales amount but I dont know how to get Rolling 12 month for previous year.
Someone assist me. how to get it.
Rolling 12 month - CALCULATE (
SUM ( 'SalesData'[SalesAmt]),
FILTER (
ALLSELECTED ( 'SalesData' ),
'SalesData'[Date] <= MAX ( 'SalesData'[Date] )
)
,'Calendar'[Years Between] = 0
)
How do I get "Rolling 12 Month - Previous Period" value?
I would like output is below,
thanks,
Ram
Rolling 12 before 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date]),-12),-12,MONTH))
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
2 Replies
- amitchandak
Super User
Rolling 12 before 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date]),-12),-12,MONTH))
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
- Ramachandran
Helper III
Hi, After updating the Rolling 12 before 12 month logic code, I'm getting the Rolling value for all the month but not latest 12 month alone. the result is below
But I want to show only last 12 months data alone.
anything, I have to add condition for this.