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
Suman8877
Advocate II
Advocate II

Need Help In Ranking ?

I have one table that have 3 columns
1. country
2. Score
3. Rank

then i create a measure to calculate average(Score for few group of country.. e.g Europe, APAC, 
my question is how to rank the measure value(average) inside the above list OR can we create the measure to calculate the rank

e.g

AvgValue for Europe = 49.90

Country   Score   Rank
Austria    50.80     21
Australia 50.20     22
Estonia   49.50     23
>>> wanted result.. rank for "avgValue for Europe" = 23
thnaks in advance for any help.

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @Suman8877 

To get solution please follow the following procedure below:
image.png

 

 

 

 

 

 

 

 

 

 

Make a copy in Power Query Editor, select the [Country] and [Continent] columns and execute Unpivot Columns.

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Remove unwanted columns.

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create two new measures.

AVG OF SCORE = AVERAGE('Table2'[Score])
RANKING = RANKX(ALLSELECTED('Table2'[Area]),[AVG OF SCORE])

 

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

1 REPLY 1
rohit1991
Super User
Super User

Hi @Suman8877 

To get solution please follow the following procedure below:
image.png

 

 

 

 

 

 

 

 

 

 

Make a copy in Power Query Editor, select the [Country] and [Continent] columns and execute Unpivot Columns.

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Remove unwanted columns.

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create two new measures.

AVG OF SCORE = AVERAGE('Table2'[Score])
RANKING = RANKX(ALLSELECTED('Table2'[Area]),[AVG OF SCORE])

 

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

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.