cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Can I get dynamic Unique Rank on the basis of 3 measure sorting in table visual?

Hi everyone,

 

I filtered my table visual as per below:

1. Sort by Largest o smallest - Ratio

2. Sort by Largest to smallest - Shipped- Issues

3. Sort by smallest to largest - Orders received

 

Now I want a dynamic ranking within all the groups and within product groups.

Dynamic ranking as in attached image and within group (say product C) it should state as 1, 2,3,4 when i filter on group level (on the basis of sorting)

 

Dynamic Rank.PNG

 

 

If I filter on group level, it should be like below

 

Group Rank.PNG

Can anyone help me up please?

1 ACCEPTED SOLUTION

Hi  @Anonymous ,

 

Create 2 measures as below:

Measure = 
var _rankbyratio=RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Ratio])),,DESC,Dense)
var _rankbyShippedIssues=RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Shipped-Issue])),,DESC,Dense)
VAR _rankbyorder=RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Orders Recd])),,ASC,Dense)
 Return
_rankbyorder+_rankbyratio+_rankbyShippedIssues
Ranking = RANKX(ALLSELECTED('Table'),'Table'[Measure],,ASC,Dense)

And you will see:

vkellymsft_0-1626426460073.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Can anyone please help on above issue?

Hi  @Anonymous ,

 

Create 2 measures as below:

Measure = 
var _rankbyratio=RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Ratio])),,DESC,Dense)
var _rankbyShippedIssues=RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Shipped-Issue])),,DESC,Dense)
VAR _rankbyorder=RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Orders Recd])),,ASC,Dense)
 Return
_rankbyorder+_rankbyratio+_rankbyShippedIssues
Ranking = RANKX(ALLSELECTED('Table'),'Table'[Measure],,ASC,Dense)

And you will see:

vkellymsft_0-1626426460073.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

Anonymous
Not applicable

Thankyou so much for the help! this works 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors