Forum Discussion

dw700d's avatar
dw700d
Post Patron
5 years ago
Solved

Calculate average count per month

Good day, I am trying to calculate the average total count of "Location Codes" per month.For instance, in the below chart the average count per month is 3.5   Location Code Creation Date 1 ...
  • parry2k's avatar
    5 years ago

    dw700d  try this

     

    Avg = 
    AVERAGEX ( VALUES ( Table[Month] ), CALCULATE ( COUNTROWS ( Table ) ) )

     

    Assuming you have a month column in your table, or I would recommend adding a date dimension in your model, and then use a month column from that dimension, you can simply add one as per my blog post.

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.