Forum Discussion

sbott's avatar
sbott
Helper I
1 year ago
Solved

Creating an average

Hi, I have a report page that has a number of charts. One of the charts displays the months along the x-axis, with the corresponding number of hours associated with each month represented by a bar. T...
  • V-yubandi-msft's avatar
    1 year ago

    Hi sbott ,

    Thanks for posting your query in the Microsoft Fabric Community. I would like to suggest another tested approach that works effectively even without a separate date table, especially if you already have a MonthYear field in your main table.

    Monthly Average Hours = 
    VAR TotalHours = SUM('Table'[Sum of Hours])
    VAR VisibleMonths = DISTINCTCOUNT('Table'[MonthYear])
    RETURN DIVIDE(TotalHours, VisibleMonths)
    

     

    FYI:

     

    Thanks for your response sbott .

     

    I've attached a PBIX file for more details. Please review it and let me know your insights.


    If my response solved your query, please mark it as the Accepted solution to help others find it easily.

    And if my answer was helpful, I'd really appreciate a 'Kudos'.