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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
RingoSun
Helper II
Helper II

Is this kind of sorting actually possible in Power BI?

RingoSun_0-1652343796530.png

I have this bar chart above and I want to change the way it is sorted. So the blue one which is the Client, I want it to always be the first one in the visual and then the rest I want them to be sorted from highest to lowest.

 

So it should look something like below.

RingoSun_1-1652343858361.png

 

Is this actually possible in Power BI? I've been playing around with the sort by columns and other stuff but I just can't get my desired result. 

 

Sample PBIX File

 

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

Hi @RingoSun ,

According to your description, I download your sample data, here's my solution.

Create a calculated column in the SOS table.

Rank =
IF (
    RELATED ( 'BrandDim'[Brand] ) = "Client",
    10000,
    RANKX (
        FILTER ( 'SOS', MAX ( 'BrandDim'[Brand] ) <> "Client" ),
        SUMX (
            FILTER ( 'BrandDim', 'BrandDim'[Brand] = MAX ( 'BrandDim'[Brand] ) ),
            'SOS'[Quantity]
        ),
        ,
        ASC,
        DENSE
    )
)

Put the rank column in the visual tooltip and sort the visual axis by rank, get the result.

vkalyjmsft_0-1652860000574.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @RingoSun ,

According to your description, I download your sample data, here's my solution.

Create a calculated column in the SOS table.

Rank =
IF (
    RELATED ( 'BrandDim'[Brand] ) = "Client",
    10000,
    RANKX (
        FILTER ( 'SOS', MAX ( 'BrandDim'[Brand] ) <> "Client" ),
        SUMX (
            FILTER ( 'BrandDim', 'BrandDim'[Brand] = MAX ( 'BrandDim'[Brand] ) ),
            'SOS'[Quantity]
        ),
        ,
        ASC,
        DENSE
    )
)

Put the rank column in the visual tooltip and sort the visual axis by rank, get the result.

vkalyjmsft_0-1652860000574.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

RingoSun
Helper II
Helper II

I've been trying out solutions to achieve this without any success so I guess it's safe to assume that this is just impossible to acheive in Power BI

Tahreem24
Super User
Super User

@RingoSun Check these videos:

https://www.youtube.com/watch?v=CpBy79AawVw

https://www.youtube.com/watch?v=uZLmWz60_do

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24 

 

That works for making the client to always be the first one in the visual but does not work for arranging the rest from highest to lowest 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors