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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jake223
Helper I
Helper I

Ranking Data

Hello,

 

I'm fairly new to PowerBi and having an issue ranking within a table visual. When I have two columns in the visual the ranking works as expected the issue is when I add additional columns to the visual the ranking list all 1's. Any help would be greatly appreciated.

 

Data Sources / Relationships

Employee Report 1:M Survey Data

 

Measure

Rank Average = RANKX(ALLSELECTED('Employee Report'[EENo]), [Final_Total Average],,DESC)
 
 
Correct Ranking.pngInCorrect Ranking.png
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

The Name column is also filtering the data (so you end up with 1s). You need to include that column too in your ALLSELECTED.

 

Rank Average = RANKX(ALLSELECTED('Employee Report'[EENo], 'Employee Report'[Name]), [Final_Total Average],,DESC)

 

Regards,

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
FrankAT
Community Champion
Community Champion

Hi @jake223 

you can do it like this:

 

22-10-_2020_14-55-33.png

 With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

mahoneypat
Microsoft Employee
Microsoft Employee

The Name column is also filtering the data (so you end up with 1s). You need to include that column too in your ALLSELECTED.

 

Rank Average = RANKX(ALLSELECTED('Employee Report'[EENo], 'Employee Report'[Name]), [Final_Total Average],,DESC)

 

Regards,

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


Thank you @mahoneypat 

 

can't believe I missed that, I updated my measure and it worked. 

RANKX(ALLSELECTED('Employee Data'), [Final_Total Average],,DESC)
 
Followup question:
I'm also looking for a second ranking measure to be the overall rank and not change when filters are applied, any idea how I could do that?
 
Example:
EENoNameAverageFilter Rank

Overall Rank

1John1.11

1

2Steve1.02

2

3Emily.23

3

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.