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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors