Forum Discussion

AmirFirdaus9509's avatar
AmirFirdaus9509
New Member
5 years ago
Solved

How to get Subtotal Percentage

Hi , I would like to request an advice on how to fetch a subtotal percentage  I have use Decomposition Tree Graph to show breakdown of a Total amount of Data and i would like to create a breakdown...
  • v-lionel-msft's avatar
    v-lionel-msft
    5 years ago

    Hi AmirFirdaus9509 ,

     

    Please refer to my .pbix file.

    Measure = 
    IF(
        HASONEFILTER(Sheet14[C1]) = TRUE(),
        IF(
            HASONEFILTER(Sheet14[C2]) = FALSE(),
            DIVIDE(
                SUMX( FILTER( ALL(Sheet14), [C1] = MAX([C1]) ), [Value] ),
                SUMX( ALL(Sheet14), [Value])
            ),
            DIVIDE(
                SUMX( FILTER( ALL(Sheet14), [C1] = MAX([C1]) && [C2] = MAX([C2]) ), [Value] ),
                SUMX( FILTER( ALL(Sheet14), [C1] = MAX([C1]) ), [Value] )
            )
        ),
        1
    )

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.