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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
natasha519
Helper II
Helper II

Sorting mixed data type in power bi

I have 2 columns (Period number and I added an index column). Screenshot below:

natasha519_0-1648558325330.png

When I do sort descending, it's not recognizing Period 10 should have a value of 0. Any ideas how to fix this?

1 ACCEPTED SOLUTION

Use this

= Number.From(Text.Select([Period Number],{"0".."9"}))

View solution in original post

3 REPLIES 3
Vijay_A_Verma
Super User
Super User

In a custom column, put following formula and then sort on this custom column

= Number.From(Text.Split([Period Number]," "){1})

OK thanks and what if in some situations there is an asterisk? It appears this formula wont work then

natasha519_0-1648559429523.png

 

Use this

= Number.From(Text.Select([Period Number],{"0".."9"}))

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors