Forum Discussion

mcaldwell's avatar
mcaldwell
Frequent Visitor
4 years ago
Solved

Rolling Average needs to exclude current month

Hello, I have the following measure that is calculating a rolling 6 month average however it includes any current month data and if an account does not have any current data it does not appear in my...
  • amitchandak's avatar
    4 years ago

    mcaldwell , Try like

     

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

     

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