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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Budfudder
Helper IV
Helper IV

Column Secondary Sort Order

I have a bunch of orders, each with a status of Won, Lost or Open. All of these orders are divided by region. So I throw them all up on a Clustered Column chart, sorting by region. Great - all works. Except that for each region, the order of the columns within the region is alpha - Lost, Open, Won. I need it to be Won, Open, Lost.

 

So I created a new column - Status Order - and populated it with:

 

Status Order = IF('Order'[Status] = "Won",
                  1,
                  IF('Order'[Status] = "Open",
                     2,
                     3))

and used the Sort by Column item in the Modelling tab to sort by that column rather than by the Status column, which it was sorting by.

 

It didn't work - made no difference at all to the display.

 

What am I doing wrong? Or not doing?

 

Thanks in advance.

7 REPLIES 7
NipponSahore
Resolver II
Resolver II

try this, 

 

Drag drop the "Status Order" Column into the tooltip section of the chart and sort the chart on this "Status Order"

That loses me the initial sort, by region.

 

It also puts the Status Order column in the tooltip, where I don't want it.

Anonymous
Not applicable

Hi @Budfudder 

 

How are you sorting this in modelling?

 

Try this way:

 

In fields  Panel-> go to the table-> select Status column, Now go to Modelling tab-> Sort by Status order column.

 

Please confirm does it solve the problem.

 

Thanks
Raj

Anonymous
Not applicable

"

and used the Sort by Column item in the Modelling tab to sort by that column rather than by the Status column, which it was sorting by.

 

It didn't work - made no difference at all to the display."

 

- Could you please post the snapshot of how you do this sorting?

 

Thanks

Raj

See below

Image3.jpg

 

jthomson
Solution Sage
Solution Sage

Rather than make a new column you could just create a new table saying Won 1, Open 2, Lost 3 and then link it, then try to sort by that column?

I'm not sure how/whether that would work - my data source is actually one very long SQL statement pulling in five or six tables from the database.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.