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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Rank with two categories - help please

Hi everyone,

 

I have a table with student name, subject, exam type and exam grade. I would like to create a rank measure/column that ranks each pupils exam grades by exam type. 

 

If two grades are the same the rank value needs to be consecutive e.g. Student 1, exam grade 9 = 1, exam grade 9 = 2, exam grade 8 = 3 and so on.

 

I think this screenshot helps explain what I am trying to do more clearly:

Screenshot

 

I've had a few attempts at RankX but can't get the correct result! 

 

Thanks for any help!

Matt

 

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi there, 

 

Thanks for offering your help. I've cleaned all the data but I'm pretty sure everything that is required is in there.

Example data - PBI file

 

Thanks again.

Matt

Hi,

I am confused.  In your original screenshot, there was a simple Table.  In your PBI file, there is a matrix.  In the matrix, where do youw ant to see the rank.  Be as clear as possible for me to assist you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish, Sorry about the confusion - I've removed the matrix and added in an example output matrix of how I would like the data to appear. This uses three measures that calculate the sum of each rank which are used in the matrix. What I don't know how to do is turn to add a new column to the Exam data table that ranks each pupil's exam results by exam type. I'm not sure if it's relevant by the Name field comes from a related table. Thanks for your help. Matt

Hi,

When i download the PBI file from that link, i still see the same matrix and there is no measure that you have written in that file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

VPN issues - the file has synced now.

Thanks

Matt

Hi,

Does this work?

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors