Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |