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.
Hello all, how can i sort below data by highest week. Here Plant 07 should come first because its highest week(52) has highest amount.
Plant | Amount | Week |
09 | 2826 | 50 |
09 | 2763 | 49 |
04 | 2683 | 52 |
04 | 2620 | 51 |
09 | 2505 | 51 |
09 | 2461 | 49 |
09 | 2333 | 48 |
2025 | 51 | |
09 | 1806 | 52 |
04 | 1653 | 49 |
08 | 1592 | 49 |
04 | 1523 | 50 |
11 | 1512 | 48 |
11 | 1426 | 49 |
09 | 1396 | 51 |
1286 | 52 | |
09 | 1217 | 48 |
11 | 1213 | 52 |
09 | 1188 | 50 |
08 | 1176 | 48 |
07 | 1175 | 48 |
01 | 1133 | 52 |
07 | 1089 | 48 |
04 | 1068 | 48 |
07 | 1041 | 50 |
07 | 1038 | 51 |
07 | 1026 | 50 |
07 | 9096 | 49 |
07 | 9075 | 49 |
07 | 7612 | 52 |
11 | 7271 | 51 |
04 | 7180 | 49 |
08 | 6855 | 51 |
04 | 6538 | 50 |
07 | 6325 | 51 |
01 | 6244 | 51 |
04 | 5901 | 48 |
09 | 5900 | 52 |
5829 | 49 | |
07 | 5722 | 52 |
11 | 4982 | 50 |
4676 | 48 | |
08 | 4352 | 50 |
3902 | 50 | |
08 | 3640 | 52 |
04 | 3633 | 51 |
01 | 3521 | 50 |
01 | 3403 | 48 |
04 | 2070 | 52 |
01 | 1989 | 49 |
Solved! Go to Solution.
Hi @harshagraj ,
Here I suggest you to try to create a rank column by dax.
Rank =
RANKX (
'Table',
CALCULATE (
SUM ( 'Table'[Amount] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Plant] ),
'Table'[Week] = MAX ( 'Table'[Week] )
)
),
,
DESC,
DENSE
)
Then add this calculated column into visual tooltips and use max function in tooltips. Finally, sort your visual by [Max of Rank] in tooltips. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @harshagraj ,
Here I suggest you to try to create a rank column by dax.
Rank =
RANKX (
'Table',
CALCULATE (
SUM ( 'Table'[Amount] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Plant] ),
'Table'[Week] = MAX ( 'Table'[Week] )
)
),
,
DESC,
DENSE
)
Then add this calculated column into visual tooltips and use max function in tooltips. Finally, sort your visual by [Max of Rank] in tooltips. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello
you can try this -
@harshagraj try this:
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |