cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
stijn007 Frequent Visitor
Frequent Visitor

ranking with identical values

Hello, 

 

I want a chart with the top 10 items shown. 

In my legend I have the treinnumbers that were selected. 

Value: Count of train numbers. 

 

I created a measure 

Top 10 treinen = RANKX(ALLSELECTED('Problemen Werken FBMZ'[Treinnummer]);CALCULATE(COUNT('Problemen Werken FBMZ'[Treinnummer])))
 
This measure is ranking but the trains who have an identical count (eg 1) are ale ranked the same way.
Now there is shown 13 trains instead of my top 10.
Power BI.png
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: ranking with identical values

Hi @stijn007 

I notice this line

Capture10.JPG

 

You write countrows(allselected(table[column]))

Please correct it by the formula below

countrows(allselected(table))

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Community Support Team
Community Support Team

Re: ranking with identical values

Hi @stijn007 
Create a measure
Final Rank = 
RANKX (
    ALLSELECTED('Table'),
    RANKX ( ALLSELECTED('Table'),CALCULATE(COUNT('Table'[number])),,DESC,Dense)
        + DIVIDE (
            RANKX (ALLSELECTED('Table'),CALCULATE(MAX('Table'[number])),,ASC,Dense),
            COUNTROWS(ALLSELECTED('Table'))
        ),,ASC,Dense
)
Capture4.JPG
 
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
stijn007 Frequent Visitor
Frequent Visitor

Re: ranking with identical values

Power BI rank.jpg

 

When I tried, the ranking is different when I order in the column "Final Rank"

Somewhere it has to order in column Count. 

 

stijn007 Frequent Visitor
Frequent Visitor

Re: ranking with identical values

Community Support Team
Community Support Team

Re: ranking with identical values

Hi @stijn007 

How do you create that incorrect measure?

Could you show me some screenshots about your columns and measure?

 

Do you want the final rank to be a column?

 

Best Regards
Maggie

stijn007 Frequent Visitor
Frequent Visitor

Re: ranking with identical values

Community Support Team
Community Support Team

Re: ranking with identical values

Hi @stijn007 

I notice this line

Capture10.JPG

 

You write countrows(allselected(table[column]))

Please correct it by the formula below

countrows(allselected(table))

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Community Support Team
Community Support Team

Re: ranking with identical values

Hi @stijn007 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
 
Best Regards
Maggie

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 242 members 2,615 guests
Please welcome our newest community members: