Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter Top N object with condition

Goodmorning,
I'm showing the top 5 values of a ratio for a given date, i.e.
Scrap% = Scrap/ (Good+Scrap).
The idea is that I don't want to show values of scrap of 100% (Good=0), therefore I applied a filter on the values different from 100%.
The problem is that my top 5 values table is blank, as I imagine that power bi identifies those 100% values as top n but then doesn't plot it as they has to be different from 100%. How can I deal with that?

 

Thank you.

  • Anonymous's avatar
    Anonymous
    5 years ago

    Thank you for your answer, 
    I found out a different solution.

     

    ranking = if([%Scrap]<>1, RANKX(all(Data), [%Scrap]), blank() )
     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you for your answer, 
    I found out a different solution.

     

    ranking = if([%Scrap]<>1, RANKX(all(Data), [%Scrap]), blank() )