Forum Discussion

nmckbcs's avatar
nmckbcs
Helper I
7 years ago
Solved

Simple Average/SUMMARIZE dax function

Hello,

I am using a AVERAGEX(SUMMMARIZE formulat to get an avg for a net promoter type calculation by month. I am also showing the percentage of each response and bucketing those in happy, mad, or passive customers each month. The percentages should tie back to the net promoter score. For instance if the net promoter score is 22% then happy customers minus mad customers should equal 22%. However, since I am doing the average any month that has no values is excluded from the average for the percentage breakdown. I am thinking that my issue is similar to this one https://community.powerbi.com/t5/Desktop/including-blanks-in-an-average-with-summarize/td-p/332922.
  • Hi nmckbcs,

     

    Please refer to below measure:

    AVG_Category_Breakdown2 =
    SUMX ( VALUES ( 'download to use'[Month] ), [Category_Breakdown] )
        / CALCULATE (
            DISTINCTCOUNT ( 'download to use'[Month] ),
            ALL ( 'download to use' )
        )

     

    Best regards,

    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi nmckbcs,

     

    Please refer to below measure:

    AVG_Category_Breakdown2 =
    SUMX ( VALUES ( 'download to use'[Month] ), [Category_Breakdown] )
        / CALCULATE (
            DISTINCTCOUNT ( 'download to use'[Month] ),
            ALL ( 'download to use' )
        )

     

    Best regards,

    Yuliana Gu