cancel
Showing results for 
Search instead for 
Did you mean: 
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
RicoZhou
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
RicoZhou
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 I
Resolver I

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.

 

 






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
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Power BI Dev Camp Session 27

Ted's Dev Camp

This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.