Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Rankx is not working count

Hello,

 

I have created the following measures, but what I get is not what I am expecting. I can fix the problem but changing the all function for 

ALL('Reporte de incidencias'[Seller] ) the reason why I dont what this is since I would like to my top N by seller, store and so on so I'd rather not create a measure for each column. I have seen videos where they just type the table and it works just fine please help

 

Count_inc = COUNTROWS('Reporte de incidencias')
rank = RANKX(ALL('Reporte de incidencias' ),[Count_inc],,DESC)
 
 

Capturekk.PNG

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Since you don't likely have a single row for each seller in that table, you will not get the expected behavior.  I think you will need separate measures for your different scenarios (when different columns in the table), or have them all as variables and choose from them with ISINSCOPE, etc..  If you will have those 3 columns, you can use ALL( ) with all 3 in it.

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Since you don't likely have a single row for each seller in that table, you will not get the expected behavior.  I think you will need separate measures for your different scenarios (when different columns in the table), or have them all as variables and choose from them with ISINSCOPE, etc..  If you will have those 3 columns, you can use ALL( ) with all 3 in it.

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

I never heard of isinscope. Could you please write an example with column seller and store please

I don't recommend that approach.  You would be writing mulitple variables each with a different RANKX expression.  Writing a Rankx measure for each scenario is simpler.  

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.