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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Comparing values in the same row and rank the columns' values

Dear All,

 

I have a data table which has the following values.

Row_NameCol_1Col_2Col_3Col_4Col_5Col_6Col_7Col_8Col_9Col_10
Row_12181843483566499595
Row_280145288302726265393
Row_348309415599965169341
Row_4141080158168721484
Row_57469956198853738482

 

What I need that rank the columns' values in every row compare to the column values and give back them rank in the selected row.

Based on the previous table data I give an solution example:

Row_NameRank_Col_1Rank_Col_2Rank_Col_3Rank_Col_4Rank_Col_5Rank_Col_6Rank_Col_7Rank_Col_8Rank_Col_9Rank_Col_10
Row_181096573411
Row_231052678841
Row_368210514937
Row_478362495101
Row_557281109634

Can you help me to prepare a measure or a calculated table or column which can help me to get back the same result?

 

Thank you in advance. 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Unpivot all the column in power query , Rename the column with column name as Column_name and use that in Matrix visual in column field.

 

and then create a Rank column

 

Rank = rankx(filter(Table, Table[Row_Name] = earlier([Row_Name])), [Column_name])

 

Column Rank: https://www.youtube.com/watch?v=wDS_Vi4r9I4&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=39

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you for the advice. Actually my real usecase isn't so simple like the example I added here so I have a "virtual" table only in measure (not a calculated table) so the unpivot method isn't an option rightnow.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors