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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
moritzmassimo
Helper I
Helper I

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
v-shex-msft
Community Support
Community Support

Hi @moritzmassimo,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @moritzmassimo,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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