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.
This is table Fact:
Date Person Place Status Sales
01/01/2020 | ABC | North | Active | 9852 |
14/01/2020 | DEF | North | Active | 3452 |
17/01/2020 | GHI | North | Active | 9084 |
02/02/2020 | GHI | North | Active | 4902 |
14/02/2020 | GHI | North | Active | 4659 |
14/02/2020 | DEF | South | Inactive | 5000 |
23/02/2020 | GHI | North | Active | 1685 |
10/03/2020 | GHI | North | Active | 6401 |
21/03/2020 | ABC | Center | Active | 4742 |
09/04/2020 | ABC | Center | Active | 6325 |
14/04/2020 | ABC | Center | Active | 8329 |
27/04/2020 | ABC | Center | Inactive | 7740 |
28/04/2020 | ABC | Center | Inactive | 5091 |
02/05/2020 | ABC | Center | Inactive | 3763 |
04/05/2020 | ABC | Center | Inactive | 1434 |
06/05/2020 | DEF | Center | Active | 3718 |
22/05/2020 | DEF | South | Active | 6639 |
03/06/2020 | DEF | South | Active | 5672 |
12/06/2020 | DEF | South | Active | 5268 |
16/06/2020 | DEF | South | Active | 3358 |
I want to calculate the ranking of sales, depending on slicers for dimensions date, person, status and place.
So:
This measure:
Solved! Go to Solution.
hi @webportal
You need to create different measure for different visual that have different row context
Ranking 2 =
IF([TotalSales],
RANKX (
ALLSELECTED ('Fact'[Person],'Fact'[Place],'Fact'[Status]),
CALCULATE ( [TotalSales] ),
,
DESC,
DENSE
))
Result:
Regards,
Lin
@webportal , measure rank is context-sensitive(Display). When you took ALLSELECTED ('Fact'), it means Rank will create at the lowest level of fact, any change in that will not give you correct rank
@webportal @v-lili6-msft my posts have been getting translated into Spanish too!
Proud to be a Super User!
hi @webportal
You need to create different measure for different visual that have different row context
Ranking 2 =
IF([TotalSales],
RANKX (
ALLSELECTED ('Fact'[Person],'Fact'[Place],'Fact'[Status]),
CALCULATE ( [TotalSales] ),
,
DESC,
DENSE
))
Result:
Regards,
Lin