Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Unsupported percentile

Hi community!   I'm trying to calculate how much data megabyte use include the top 20% users/account. I have a table with all kinds of data_MB values in one column, and to calculate the 80th pre...
  • v-jingzhang's avatar
    4 years ago

    Hi Anonymous 

     

    Your current [Perc] is a measure right? If so, it should be calculated on the whole table rather than on every accountid. When you add accountid column to the table visual, the [Perc] is evaluated for every acountid so it couldn't return the correct result. Instead, you can try the following measure

    test =
    IF (
        SUM ( 'table'[data_MB] ) > CALCULATE ( [Perc], ALLSELECTED ( 'Table' ) ),
        1,
        0
    )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.