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 moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I am struggling to acheive a ranking in PBI. In Excel the formula is:
=IF(A45="","",IF(A45<>"",RANK(D45,$D$45:$D$9999),""))
Column A = Customer Name
Column D = Margain figures
Is there a DAX version of this at all please?
Thanks in advance
Solved! Go to Solution.
Hi @Anonymous ,
Do you want to use DAX to calculate the ranking of the corresponding margin among all customers' margins when the customer name is not empty? If I understand correctly, you can try the following formula.
Create a calculated column.
rank = IF('Table'[Customer Name]="",BLANK(),RANKX(FILTER(ALL('Table'),'Table'[Customer Name]<>""),'Table'[Margain figures]))
The output of my test.
———————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li
Hi @Anonymous ,
Do you want to use DAX to calculate the ranking of the corresponding margin among all customers' margins when the customer name is not empty? If I understand correctly, you can try the following formula.
Create a calculated column.
rank = IF('Table'[Customer Name]="",BLANK(),RANKX(FILTER(ALL('Table'),'Table'[Customer Name]<>""),'Table'[Margain figures]))
The output of my test.
———————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li
Hi! Here is the RANKX DAX informations: RANKX function (DAX) - DAX | Microsoft Learn
Proud to be a Super User! | |
Check out the April 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 |
|---|---|
| 35 | |
| 27 | |
| 26 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 36 | |
| 32 | |
| 26 | |
| 23 |