Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I'm struggling with making rank with only one column if there are multiple columns in the Table visual.
So basically I want to make rank with Key1 only when there is Key2 in the Table.
I tried a lot of rank measures. Basic rank meausre is RANKX(ALL('Table'[Key1]),CALCULATE(SUM('Table'[Value]))).I tried rankx with HASONEVALUE, ALLEXCEPT, ALLSELECTED, ALLEXCEPT but none of them helped me.
As you can see in the pictures below, if there is only Key1, rank works fine. But when Key2 is added, it gives a rank within the group of Key1 and Key2.
Can anyone helps me? Any helps are welcomed. Thanks!
p.s. I tried to upload my PowerBI file but it's not supported. This is the table I used.
Solved! Go to Solution.
Hi @Anonymous
Try this measure :
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Anonymous
Try this measure :
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!