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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors