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! Request now

Reply
Anonymous
Not applicable

Sort visual with null at last spot

Hi,

I have a bar chart with categories on the x axis, which should be sorted according to a specific order (already have column with order). This works fine, but unfortunately it can be that some products have no category number and therefore the table with the category descriptions won't find a matching description. This creates null values in the visual (which is fine), but I want to have the null at the back of the chart (right side).

Following doesn't work for me, as I don't have the nulls in the table with the category description:
https://community.powerbi.com/t5/Desktop/sort-by-ascending-values-with-non-blanks-on-top/td-p/689199

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

You can extract all the field values to create a new table and set 'sort order' of these values. (setting 'sort by column' property by custom order field)
After these steps, you can build a relationship between this table and the original table, then use new table field to replace the old one on visual to enable the custom sort order.

Custom Sorting in Power BI 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

You can extract all the field values to create a new table and set 'sort order' of these values. (setting 'sort by column' property by custom order field)
After these steps, you can build a relationship between this table and the original table, then use new table field to replace the old one on visual to enable the custom sort order.

Custom Sorting in Power BI 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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