Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Top Quartile with All statement

Hi All, 

 

I am trying to report the Top Quartile over a measure.

 

The first 3 columns of the table is the data to work with and the final column is the desired outcome. 

 

SchoolResponsesMeasure

Top_Quartile

This column is the desired outcome

Record 1104887.9891.96
Record 2108291.6891.96
Record 3134292.2591.96
Record 425290.4891.96
Record 547988.9491.96
Record 6187592.0591.96
Record 734192.9691.96
Record 8162989.0791.96
Record 919881.8291.96
Record 1020289.6091.96
Record 1175384.8691.96
Record 1213397.7491.96
Record 13222988.2591.96
Record 14129285.0691.96
Record 1514381.8291.96
Record 1675285.9091.96
Record 1714164.5491.96
Record 18114193.0891.96
Record 19110886.3791.96
Record 2096187.7291.96

 

I need to be able to filter out all records with fewer than 100 responses for the real data, both responses and Measure are measures. 

I am currently using the formula below but I cant seem to wrap the all statement correctly, I have tried variations of this but the latest failed formula is:

 

Top_Quartile_Sch3 = 

VAR Summary =

ADDCOLUMNS(

SUMMARIZE(

'_Source Data_Course',

'_Source Data_Course'[School]

),

"Measure",IF([Responses]>99,[Measure])

)

VAR TQ = CALCULATE(PERCENTILEX.INC(Summary,

[Measure],0.75

),ALL('_Source Data_Course'[School]))

RETURN

TQ

Help would be greatly appreciated 🙂

2 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    You could try the following DAX:

    Top_Quartile_Sch3 =
    VAR Summary =
        ADDCOLUMNS (
            SUMMARIZE ( ALL ( '_Source Data_Course' ), '_Source Data_Course'[School] ),
            "Measure", IF ( [Responses] > 99, [Measure] )
        )
    VAR TQ =
        PERCENTILEX.INC ( Summary, [Measure], 0.75 )
    RETURN
        TQ

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-eachen-msft, thanks for this, its not returning any results unfortunately.