Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
84 | |
76 | |
65 |
User | Count |
---|---|
145 | |
109 | |
109 | |
102 | |
96 |