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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
blossfeld
Frequent Visitor

Sorting

Hi

 

One sorting problem. How to sort text column like "Sorted version".

 

OrginalSorted version
1. John1. John
10. John2. James
2. James3. John
3. John4. John
4. John5. James
5. James6. John
6. John7. John
7. John8. James
8. James9. John
9. John10. John
1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

Using Power Query.

Split the column using . as the separator.

Sort the data on the numeric column.

Merge the columns back together.

 

OR

Why continue to work with the data in the original format?  Split the column, treat text as text, numeric as numeric and live happily ever after.

View solution in original post

4 REPLIES 4
hthota
Resolver III
Resolver III

Go to PowerQuery Editor.
Duplicate the Column. Extract the Id's using Text Before Delimiter. Later convert the datatype of Id's as Whole Numeric. Click on Close and Apply.

To sort the data in visual. Sort the Data on bases of Id's Column.

Thanks, could I sort them also in slicer?

Hi @blossfeld ,

 

Yes. After you have sorted the original column based on ID number in Data view mode, it would be dispalyed in correct order in slicer, too.

 

In Power Query, duplicate the original column, split it by delimiter ".", remove unnecessary columns.

2.PNG3.PNG

 

In data view, change the default "Sort by" column to [ID].

1.PNG

 

Add column into slicer.

4.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HotChilli
Community Champion
Community Champion

Using Power Query.

Split the column using . as the separator.

Sort the data on the numeric column.

Merge the columns back together.

 

OR

Why continue to work with the data in the original format?  Split the column, treat text as text, numeric as numeric and live happily ever after.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.