Forum Discussion

jabueg's avatar
jabueg
Helper I
1 year ago
Solved

Help Calculating Average Excluding 2 Conditions

I have an existing DAX measure which gets average of completed fields in the "Master AE" table (there's 35 required fields):  [EPIC %] = CALCULATE(   DIVIDE([EPIC Points], COUNTROWS('Master AE')*3...
  • jabueg's avatar
    1 year ago

    I figured out the solution. Had to create a calculated a column "Filtered Points" in Table view to filter out the condition and set them to 0  - 

    Filtered Points =
    IF (
        'Master AE'[EPIC Points Count] <= 17 && 'Master AE'[Quarter #] > 2,
        0,
        [EPIC Points Count]
    )
    And then created a new measure with the new calculated column:
    EPIC Points Risk =
    var Points = SUM('Master AE'[Filtered Points])


    RETURN
    Points


    Lastly, created new measure to get average of filtered points (excluding the conditions):


    NEW EPIC % =
    CALCULATE(
        DIVIDE([EPIC Points Risk], COUNTROWS('Master AE')*35), FILTER('Master AE', 'Master AE'[Filtered Points]<>0))

     



    Thanks to all who helped anyway!