Forum Discussion

MidiGlitch's avatar
MidiGlitch
Frequent Visitor
9 years ago
Solved

Filter data by excluding max and min values

Hi All: I have a table grouped by Ids and for each Id there are several rows. Unfortunately, both the max and min values of a column I wish to display are spurious and I want to filter them out of t...
  • MFelix's avatar
    9 years ago

    Hi MidiGlitch,

     

    Add this measure to your data:

    Average_Without_Max_MIN =
    VAR Maximum =
        MAX ( Table2[Values] )
    VAR Minimum =
        MIN ( Table2[Values] )
    RETURN
        CALCULATE (
            AVERAGE ( Table2[Values] ),
            Table2[Values] <> Maximum
                && Table2[Values] <> Minimum
        )

    As you can see below it ignores the max and minimum in each group

     

     

    Regards,

    MFelix