Forum Discussion

hackfifi's avatar
hackfifi
Helper V
5 years ago
Solved

Average Line in Column Chart not calculating

Good Day - I am strugging to get an STRAIGHT Average Line for a measure irrespective of the X axis. I have a measure which calculates the average correctly i.e. shown in the image/card as 2.03 When...
  • v-lili6-msft's avatar
    v-lili6-msft
    5 years ago

    HI  hackfifi 

    Just add a IF conditional in formula as below:

    Avg PF = 
    IF(NOT(VALUES(Projects[Project])) IN VALUES('Exclude Projects'[Project]), 
    CALCULATE(AVERAGEX(Projects,[PF]),ALLSELECTED(Projects)))

    Result:

     

    Regards,

    Lin