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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
atin
Resolver I
Resolver I

Ranking Column required based on more than 1 column in the dataset

Hi All  - please find attached a list of all the premier league teams and the rankings, based on Points, Match Played and Goals Difference(GD)

 

I would like to create a Ranking Column to mirror the attached spreadsheet example. I have highlighted some of the teams in Yellow which have similar points however the ranking is based on GD, Points & Matches Played

 

I had originally created a ranking measure

 = RANKX( ALLSELECTED( 'TeamStatsTable'[Team] ) , CALCULATE( SUM ('TeamStats'[Points]  )  ) ) 

However this measure only considers the points column and I would like help on how to incorporate the other columns in my measure

 

Many thanks

 RankingRanking

2 ACCEPTED SOLUTIONS
vanessafvg
Super User
Super User

this is quite a useful article https://www.sqlbi.com/articles/rankx-on-multiple-columns-with-dax-and-power-bi/#





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

Fowmy
Super User
Super User

@atin 

In addition to the article suggested by @vanessafvg , if you like to try a simple Power Query solution when you need a static ranking, try the following:

Sort the Pts and GD columns Descending and Played Ascending order then add an index column with 1

Fowmy_0-1611478818767.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@atin 

In addition to the article suggested by @vanessafvg , if you like to try a simple Power Query solution when you need a static ranking, try the following:

Sort the Pts and GD columns Descending and Played Ascending order then add an index column with 1

Fowmy_0-1611478818767.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

vanessafvg
Super User
Super User

this is quite a useful article https://www.sqlbi.com/articles/rankx-on-multiple-columns-with-dax-and-power-bi/#





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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