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
zerob
Regular Visitor

sort by ascending values with non-blanks on top

can any help me figure out how to sort a column with ascending only with non blank values on top?

 

= Table.Sort(#"Reordered Columns",{{"Mark", Order.Ascending}})

 

The table only return blank values on top.

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@zerob 

 

You can add a supporting custom column and then sort by that column

 

=if [Column1] = null then Number.PositiveInfinity else [Column1]

sortying.png

Thanks for the reply, but is there a way to sort by just adding a formula? like nonblankvalues..sort.ascending?

 

The values in my column are alpha numerica so even if I add infinity or null to blank it sorts null in the middle of my values. Sure i can put the values like zzzzzz9999 and it will go to the bottom, but is there a better way to do this?

 

thanks

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
Top Kudoed Authors