cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DDom Frequent Visitor
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.

 

Thanks a lot for your help in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
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
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/


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


Community Support Team
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.
DDom Frequent Visitor
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?

 

Thanks again for your help.

Highlighted
Community Support Team
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,

Please share some simple data sample and expected output. You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

 

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.
DDom Frequent Visitor
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 Smiley Happy

 

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.