cancel
Showing results for
Did you mean:
Frequent Visitor

## Indicate if among Top X values

Hi all,

I feel a bit stuck with this: I want to indicate if a value is among the top 50 values. Idealy this should be dynamic, so that this calculated with the currently selected filters. Is this possible?

I do not want these items to show in a table but that the conditional column states "1" if it is among the top 50 and zero if it is not.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Indicate if among Top X values

hi, @DDom

You could take a look at this post, it has the same logic.

https://community.powerbi.com/t5/Desktop/How-to-show-top-50-and-bottom-50-records-in-a-table/m-p/627...

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Super User

## Re: Indicate if among Top X values

You want to use RANKX in a measure.

https://docs.microsoft.com/en-us/dax/rankx-function-dax

https://dax.guide/rankx/

Proud to be a Datanaut!

Community Support Team

## Re: Indicate if among Top X values

hi, @DDom

You could take a look at this post, it has the same logic.

https://community.powerbi.com/t5/Desktop/How-to-show-top-50-and-bottom-50-records-in-a-table/m-p/627...

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Indicate if among Top X values

Thanks for your responses @v-lili6-msft & @Greg_Deckler !

Unfortunately this does not solve my case. I want to set up an additional column in which each row gets +1 if a certain criteria is met, like beeing among the top values. Then I also have other limits for which this column would add +1.

My approach was something like =If(Value > 'Mininum of TOP50 Values'; 1 ; 0 )

Since I cannot use calculate in an If formula (at least Power BI tells met that?) I am wondering if it is even possible what I am trying to do here?

Highlighted
Community Support Team

## Re: Indicate if among Top X values

hi, @DDom

The logic is the same, you could use calculate in an If formula,

"Power BI tells met that?", there should be something wrong in your formula,

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Indicate if among Top X values

Thanks for your patience and your explanation, will try to do better next @v-lili6-msft

There was an errorous relationship which caused the error, the calculation works within the if formula and with some small modification I also get the result I wanted.

Thanks again.