Forum Discussion

bideveloper555's avatar
4 years ago
Solved

MOM with condition (filter)

hi, amitchandak has answered MOM but i need to implement condition . https://community.powerbi.com/t5/Desktop/Comparing-Last-month-last-3-months-and-last-12-month-to-last/m-p/893894   if am doing...
  • amitchandak's avatar
    4 years ago

    bideveloper555 , If you have date selected from date table

     

    Rolling 3= CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))

     

    Rolling 3 last year = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date ]),-12) ,-3,MONTH))

     

    But remember this will rolling 3 one value for 3 months, not a trend as one value is suggested.

     

    Also, refer

    Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI