Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Community,
The Rankx function doesnt seem to work. Below is the screenshot.
Can anyone please help what wrong am I doing here
Solved! Go to Solution.
You need to use CALCULATE to force context transition
Ranking Sales =
RANKX (
ALL ( Orders[Row ID], Orders[Sales] ),
CALCULATE ( SUM ( Orders[Sales] ) ),
,
DESC,
DENSE
)
Create a measure
You need to use CALCULATE to force context transition
Ranking Sales =
RANKX (
ALL ( Orders[Row ID], Orders[Sales] ),
CALCULATE ( SUM ( Orders[Sales] ) ),
,
DESC,
DENSE
)
Hi @powerbidev123 ,
first you can create mesure of total_sales
revenue = SUM(Sales[SalesAmount])
and after you can create rankx measure and use ALL(sales) table.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |