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
Krishnan_47
Helper I
Helper I

Ranking by Group

Hi All,

 

I need help in creating a rank field based on two columns Asset Class and Sub Asset. The Asset Class should be grouped, so that for a new asset class the ranking should start from 1.  I tried many solutions in online but couldnt find the right solution.

Krishnan_47_0-1643293208723.png

 

1 ACCEPTED SOLUTION
ALLUREAN
Solution Sage
Solution Sage

Hi, @Krishnan_47 

Please try this example below using ranking based on calculated column and also using a measure:

https://www.dropbox.com/s/k7j80i5pzjetuaw/Ranking%20by%20Group%28allure-analytics.com%29.pbix?dl=0

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

6 REPLIES 6
ALLUREAN
Solution Sage
Solution Sage

Hi, @Krishnan_47 

Please try this example below using ranking based on calculated column and also using a measure:

https://www.dropbox.com/s/k7j80i5pzjetuaw/Ranking%20by%20Group%28allure-analytics.com%29.pbix?dl=0

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Hi ALLUREAN, thank you for the solution. I have tried it and found that the measure is working fine when we apply filters in selection panel. The rank changes dynamically, but when we filter through join, the ranking is not changing dynamically. 

In my solution, I have another table with two columns, 'Date' and 'Sub Asset Class'. I join this table with 'Sub Asset Class' column to the first table 'Sub Asset Class' Column. Please find screenshot below of the table:

Krishnan_47_0-1643370797088.png

Please find below the expected result and current result that is displaying when I select Jan 2021 in the selection pane:

Krishnan_47_1-1643370895393.png


 

CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1643299052837.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Can we get this dynamically in a DAX measure. I also want to consider the Sub Asset column as well

Hi CNENFRNL, I am getting an error at EARLIER function.

Anonymous
Not applicable

can you please show your measure youre using for ranking 

 

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.