cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User I
Super User I

Sorting the Numbers in Text format

HI All,

I need help in sortign this issue. I have a numbers which in a text format in a string , which I want to sort in the Asc- desc.

I did the sorting, but 10X comes before 2X, i want to have 1X, 2X, in a ASC order.

I tried this formula from the post by did not work in my case :https://community.powerbi.com/t5/Desktop/Number-sorting-in-text-format/td-p/237256

@MFelix 

 

Thanks,

Tejaswi

 

My data looks like this:

10X10 TYPE 1 POLY 
10X12 .001 STD 
10X8X24 .002 LOW 
1-1/2X2 .002 C
11-1/2X6-1/2X21-1/2 .00050 WHT 
28X32 .004 LOW 
29x29x42 3mil
2X10 .002 CLEAR LOW DENSITY
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Sorting the Numbers in Text format

@tejaswidmello see attached, check logic in Power Query, you can tweak the logic on your larger dataset but this one is tested on this smaller dataset, I assume this will give you an idea and get started. Cheers!!

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

7 REPLIES 7
Highlighted
Super User IV
Super User IV

Re: Sorting the Numbers in Text format

@tejaswidmello , You make have to use

https://docs.microsoft.com/en-us/powerquery-m/list-sort

 

list.sort({[col1]})



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Super User I
Super User I

Re: Sorting the Numbers in Text format

HI @amitchandak ,

 

Thanks for your reply!

 

I had tried this option.. But still it doesn't sort.

Attachig my file for your refernce.

 

Thanks,

Tejaswi

Highlighted
Helper I
Helper I

Re: Sorting the Numbers in Text format

Hi @tejaswidmello 

 You can make another table (sorting) and make a relationship with previous table on the basis of status like
Screenshot (45).png

and put the status into the axis ex:
1. my previous visual
Screenshot (42).png

2. after sorting with visual it gives me like:

after sortingafter sorting

 

Thanks
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

Highlighted
Super User IV
Super User IV

Re: Sorting the Numbers in Text format

@tejaswidmello is this what you are looking for?

 

image.png






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Super User I
Super User I

Re: Sorting the Numbers in Text format

HI @parry2k ,

 

Yes .. Can you share what you did to make it sort ?

 

Thanks,

Tejaswi

Highlighted
Super User IV
Super User IV

Re: Sorting the Numbers in Text format

@tejaswidmello see attached, check logic in Power Query, you can tweak the logic on your larger dataset but this one is tested on this smaller dataset, I assume this will give you an idea and get started. Cheers!!

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Highlighted
Super User I
Super User I

Re: Sorting the Numbers in Text format

Thanks @parry2k 

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Kudoed Authors