Forum Discussion

etane's avatar
etane
Icon for Helper V rankHelper V
2 years ago
Solved

Running Average per Month with Month Filter

Hello.   I need a DAX for the requirement below:   I am trying to add a card to report.  This card should calculate the running average of store openings per month.  And, it should be filterable ...
  • Ritaf1983's avatar
    2 years ago

    Hi etane 
    You can use dax:

    Average opend =
     var max_month = month(max('Stores'[Opened Date]))
     Var min_month = month(min('Stores'[Opened Date]))
     var months = max_month-min_month+1
     RETURN
    divide (DISTINCTCOUNT(Stores[Stores]),months)
    Result:

     

    the updated pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly