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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I used RANKX to set up my Power BI report before. But today I got some problems when using RANKX and Sort by Column function at the same time. I really need you help, I really appreciate that.
This is my test data, Product is sort by Product as normal
These are 2 measures to test data:
test_c = CONCATENATEX(ALL(test[Product]),CALCULATE(SUM(test[Qty])),,",",ASC)
test_r = RANKX(ALL(test[Product]),CALCULATE(SUM(test[Qty])),,ASC)
The result looks well. But I want to sort Product by column "Sort"
After that when I come back to my 2 measures, it's give wrong number. I dont know why?
I did research a lot around to this problem, but I still did not get the answer. Did anyone get into this situation before, how can I solve this problem?
Thank you all
Solved! Go to Solution.
@bir1concepts , Try Rank like
test_r = RANKX(ALL(test[Product], test[Sort),CALCULATE(SUM(test[Qty])),,ASC)
Same way you can try for another measures
@bir1concepts , Try Rank like
test_r = RANKX(ALL(test[Product], test[Sort),CALCULATE(SUM(test[Qty])),,ASC)
Same way you can try for another measures
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |