Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate % on tot into the Card Object

 

Hello teams,

I'd like to solve this problem. At belove, an example of my data:

 

The column CUT_OFF is calculated that: if(KPI_1>5;1;0).

 

Now my desire is to calculate the percentage value of how many suppliers exceed the threshold compared to the total considering only the separate suppliers. In this case it is equivalent to 3/4 = 66.6%

 

 

 

  • Hi Anonymous,

     

    New below measure.

    % =
    CALCULATE (
        DISTINCTCOUNT ( Test1[SUPPLIER] ),
        FILTER ( ALLEXCEPT ( Test1, Test1[YEAR] ), Test1[CUT_OFF] = 1 )
    )
        / CALCULATE (
            DISTINCTCOUNT ( Test1[SUPPLIER] ),
            ALLEXCEPT ( Test1, Test1[YEAR] )
        )

     

    Best regards,

    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    New below measure.

    % =
    CALCULATE (
        DISTINCTCOUNT ( Test1[SUPPLIER] ),
        FILTER ( ALLEXCEPT ( Test1, Test1[YEAR] ), Test1[CUT_OFF] = 1 )
    )
        / CALCULATE (
            DISTINCTCOUNT ( Test1[SUPPLIER] ),
            ALLEXCEPT ( Test1, Test1[YEAR] )
        )

     

    Best regards,

    Yuliana Gu