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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.