Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

summarise filter formila DAX error

Hi Experts

 

is it possible to summarise data and filter the the summarise table to work out the sum of the filter data set i.e. similiar to what i am trying to achieve using DAX

 

STDEV.P(
    SUMMARIZE (filter ( 'Sheet1', Sheet1[OUTCOMETYPE]="Revised"), Sheet1[PRIMARYTOOUTCOMEYEARS] ),
            CALCULATE(SUM(Sheet1[PRIMARYTOOUTCOMEYEARS])))
  
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous ,

    You can create a measure with following formula to apply multiple aggregates on filtered records:

    measure =
    STDEVX.P (
        SUMMARIZE (
            FILTER ( ALLSELECTED ( 'Sheet1' ), Sheet1[OUTCOMETYPE] = "Revised" ),
            [PRIMARYTOOUTCOMEYEARS],
            "Total", SUM ( Sheet1[PRIMARYTOOUTCOMEYEARS] )
        ),
        [Total]
    )

    Regards,

    Xiaoxin Sheng

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    You can create a measure with following formula to apply multiple aggregates on filtered records:

    measure =
    STDEVX.P (
        SUMMARIZE (
            FILTER ( ALLSELECTED ( 'Sheet1' ), Sheet1[OUTCOMETYPE] = "Revised" ),
            [PRIMARYTOOUTCOMEYEARS],
            "Total", SUM ( Sheet1[PRIMARYTOOUTCOMEYEARS] )
        ),
        [Total]
    )

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Xiaoxin Sheng

       

      brilliant many  thanks.