Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
26 | |
17 | |
12 | |
12 | |
10 |
User | Count |
---|---|
32 | |
25 | |
16 | |
14 | |
13 |