Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Average line

Hello,   Within a line chart in Power BI you have the ability to add an Average Line. I am interested to know how I would calculate this within a measure. I am looking to be able to display average...
  • v-yulgu-msft's avatar
    v-yulgu-msft
    9 years ago

    Hi Anonymous,

     

    You could refer to below DAX formula to calculate the Average measure:

    Average =
    CALCULATE ( SUM ( Table_Name[expenses value] ), ALL ( Table_Name ) )
        / CALCULATE ( DISTINCTCOUNT ( Table_Name[Month column] ), ALL ( Table_Name ) )

    Regards,
    Yuliana Gu