Forum Discussion

Ramachandran's avatar
Ramachandran
Icon for Helper III rankHelper III
4 years ago
Solved

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

 

  • Ramachandran ,

    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

  • Ramachandran ,

    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's avatar
      Ramachandran
      Icon for Helper III rankHelper 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.