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
Anonymous
Not applicable

Sorting columns of text

Hi there,

 

New to the forum and also power bi.

 

I am currently trying trouble sorting a column of different text descriptions. The column currently contains phrases such as xxxx completed, completed, delivered xxxx, cancelled,,, xxx cancelled,,, and another 100 or so phrases. That isnt the issue. 

 

What I am wanting to do is generate another column where by if the word cancelled is contained within column 1, in column 2 it just shows cancelled. 

If column 1 contains completed or delivered column 2 then calls it completed.

if column 1 does not contain any of these words then column 2 calls it in progress. 

 

Im trying to crete this column 2 for use in a slicer. So if there is another way of achieving the same outcome, ie. grouping a column of 100 different texts into 3 I am open to suggestions.

 

Thanks in advance people.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You can use conditional column function in Power Query Editor.

Due to I don't know your data model, I build a sample to have a test.

1.png

Conditioal column function and result,

2.png

You can download the pbix file from this link: Sorting columns of text

 

Best Regards,

Rico Zhou

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @Anonymous 

You can use conditional column function in Power Query Editor.

Due to I don't know your data model, I build a sample to have a test.

1.png

Conditioal column function and result,

2.png

You can download the pbix file from this link: Sorting columns of text

 

Best Regards,

Rico Zhou

 

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

AlB
Community Champion
Community Champion

Hi @Anonymous 

This can be best done in Power Query. Please paste some sample data in text-tabular format so that it can be copied

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

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