Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
harshagraj
Post Partisan
Post Partisan

Sort Axis and legend

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.

PlantAmountWeek
09282650
09276349
04268352
04262051
09250551
09246149
09233348
 202551
09180652
04165349
08159249
04152350
11151248
11142649
09139651
 128652
09121748
11121352
09118850
08117648
07117548
01113352
07108948
04106848
07104150
07103851
07102650
07909649
07907549
07761252
11727151
04718049
08685551
04653850
07632551
01624451
04590148
09590052
 582949
07572252
11498250
 467648
08435250
 390250
08364052
04363351
01352150
01340348
04207052
01198949

 

harshagraj_0-1664372353144.png

@amitchandak 

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

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.

RicoZhou_2-1664418220901.png

 

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.

 

 

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

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.

RicoZhou_2-1664418220901.png

 

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.

 

 

JadhavVarsha_13
Resolver II
Resolver II

Hello 

you can try this - 

JadhavVarsha_13_0-1664374241666.png

 

parry2k
Super User
Super User

@harshagraj try this:

 

parry2k_0-1664374083804.png

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.