Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi every one
I have a problem with rank as below. I have a below table with 5 provinces, each province apprears differently (1,2 or rows)
So I must ranks sales based on province as belows. Example: Province A has 3 rows of sales: 70,51,78 => Equivalent Rank: 2,3,1
Therefore I need a DAX formula for rank this table
Thank you very much!
PROVINCE | SALES | RANK |
A | 70 | 2 |
B | 23 | 1 |
A | 51 | 3 |
C | 34 | 2 |
D | 29 | 2 |
D | 14 | 1 |
B | 26 | 2 |
E | 22 | 1 |
A | 78 | 1 |
C | 22 | 1 |
Solved! Go to Solution.
Try this as a calculated column:
Rank = rankx(filter(table1, Table1[province]= earlier(Table1[province])),table1[sales])
Try this as a calculated column:
Rank = rankx(filter(table1, Table1[province]= earlier(Table1[province])),table1[sales])
waw, that works perfectly
Thank you very much!
Try this.
Rank = RANKX(Filter('Rank', 'Rank'[PROVINCE] = EARLIER('Rank'[PROVINCE])),'Rank'[SALES],,DESC,Dense)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
88 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |