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,
I am looking for the DAX formula to create a calculated column to show the rank by value, per month and per product.
The rank column should look like this:
Month | Product | Company | Value | Rank |
1/01/2017 | A | Hello | 300 | 1 |
1/01/2017 | A | Bla | 250 | 2 |
1/01/2017 | A | Hey | 100 | 3 |
1/02/2017 | B | Hello | 20 | 3 |
1/02/2017 | B | Bla | 40 | 2 |
1/02/2017 | B | Hey | 50 | 1 |
1/01/2017 | B | Bla | 245 | 1 |
Many thanks for your help!
Kind regards,
Evelien
Solved! Go to Solution.
Hi, try with this:
Rank-CC = RANKX ( ALL ( Table1[Company] ), CALCULATE ( SUM ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Month], Table1[Product], Table1[Company] ) ) )
Regards
Victor
Lima - Peru
Hi, try with this:
Rank-CC = RANKX ( ALL ( Table1[Company] ), CALCULATE ( SUM ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Month], Table1[Product], Table1[Company] ) ) )
Regards
Victor
Lima - Peru
Hi @Evelien
Try this calculated column
RANK_ = RANKX ( FILTER ( ALL ( TableName ), MONTH ( TableName[Month] ) = MONTH ( EARLIER ( TableName[Month] ) ) && TableName[Product] = EARLIER ( TableName[Product] ) ), TableName[Value], , DESC, DENSE )
Hi @Zubair_Muhammad,
Thanks for your help, but I do not get the correct rank when using the formula you suggested :-S
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |