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
CorkeMP
Regular Visitor

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/

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/

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/

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
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.