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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.