This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hello Community,
I am trying to create a calculated column to deliver a rank. I have a table of data the looks something like this...
| Test ID | Run ID |
1 | 5 |
| 1 | 8 |
| 1 | 3 |
| 2 | 6 |
| 2 | 3 |
| 2 | 1 |
| 3 | 1 |
| 3 | 5 |
| 3 | 9 |
And Im looking to rank the Run ID from highest value to lowest for each Test ID, the expected table would show...
| Test ID | Run ID | Rank |
1 | 5 | 2 |
| 1 | 8 | 3 |
| 1 | 3 | 1 |
| 2 | 6 | 3 |
| 2 | 3 | 2 |
| 2 | 1 | 1 |
| 3 | 1 | 1 |
| 3 | 5 | 2 |
| 3 | 9 | 3 |
Any help from the community is much apperciated!!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Rank CC =
VAR currentTestID = Data[Test ID]
VAR withinTestID_Table =
FILTER ( Data, Data[Test ID] = currentTestID )
RETURN
RANKX ( withinTestID_Table, Data[Run ID],, ASC )
Thanks for the help! Both solutions work as expected.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Rank CC =
VAR currentTestID = Data[Test ID]
VAR withinTestID_Table =
FILTER ( Data, Data[Test ID] = currentTestID )
RETURN
RANKX ( withinTestID_Table, Data[Run ID],, ASC )
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 22 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 43 | |
| 41 | |
| 41 | |
| 21 | |
| 21 |