The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
33 | |
14 | |
11 | |
10 | |
8 |