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! Learn more

Reply
Anonymous
Not applicable

Sort Issue

Hi, 
I am trying to sort a filter that has text. I want to sort it ascending wise. 
I have assigned a new column number and gave each value a number. But I still can't sort it 

Capture.PNG
the code:

Number = SWITCH (
TRUE (),
'Won_count'[WonOppsSoftAmountLast1Yr_filter] = "under $25k", 1,
'Won_count'[WonOppsSoftAmountLast1Yr_filter] = "$25Kto$50K", 2,
'Won_count'[WonOppsSoftAmountLast1Yr_filter] = "50Kto$100K", 3,
'Won_count'[WonOppsSoftAmountLast1Yr_filter] = "$100Kto500K", 4,
'Won_count'[WonOppsSoftAmountLast1Yr_filter] = "$500Kto1Million", 5,
'Won_count'[WonOppsSoftAmountLast1Yr_filter] = "$1 Million and Over", 6,
10
)

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

We suggest you to create a new Won_count table with unique values. And then create a one-to-many relationship with the original table.

You can refer the following steps.

 

1. Create a new table.

 

Table = DISTINCT(Won_count)

 

Sort1.jpg

 

2. Then create the relationship.

 

sort2.jpg

 

3. Create a slicer using Table[WonOppsSoftAmountLast1Yr_filter] and sort by number.

 

sort3.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

View solution in original post

11 REPLIES 11
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

We suggest you to create a new Won_count table with unique values. And then create a one-to-many relationship with the original table.

You can refer the following steps.

 

1. Create a new table.

 

Table = DISTINCT(Won_count)

 

Sort1.jpg

 

2. Then create the relationship.

 

sort2.jpg

 

3. Create a slicer using Table[WonOppsSoftAmountLast1Yr_filter] and sort by number.

 

sort3.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

Anonymous
Not applicable

@v-zhenbw-msft  thankyou it worked!

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

In the Data View.

 

Select the Column Software Amount Last Type,  click on Sort By Column and Sort it by Number

 

1.jpg

 

 

Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

Anonymous
Not applicable

@harshnathani ,
the column software amt last is already sort by itself. If I try to change the sorting from Sort by Column, I get below error:

 

Capture.PNG

parry2k
Super User
Super User

@Anonymous did you used sort by to sort your text column

 

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!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Anonymous
Not applicable

@parry2k 
yes, but that remains un-highlighted I cannot select it

@Anonymous can you share screen shot?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

@Anonymous did you look at the post I shared.

 

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!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Anonymous
Not applicable

@parry2k 
the sort column was grayed out initially. I have moved the column "number" to filters.
I still cannot select anything under sort by column. the drop-down menu does not show up 

 

Capture.PNG

Anonymous
Not applicable

 

@parry2k ,
if I check this in data; below is the sorting criteria but nothing works

 

 

IMG_4951.jpg

Anonymous
Not applicable

@parry2k 
do I need to add the column "number" (where I have assigned all the numbers based on sorting ) in any of these 
fields.

Capture.PNG

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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