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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Removing unexpected text from a column

Hello,

I have a column which contains a number of different word values that repeat numerous times down the column. 

Sometimes there's instances where the these words have extra text at the end and there's different delimiters used so its hard to predict and therefore I've not used that function. 

 

Is there a way to just retain the standard word values and delete the extra text without knowing what that extra text will be? It happens across the majority of the different word values too.

 

So in the below table I'd like to only keep the non-red text. Thanks

 

StatusCount
Backlog12
Backlog - 26th Sept45
Archived2
Archived xyz0
Archived-12314
1 ACCEPTED SOLUTION
JoeBarry
Solution Sage
Solution Sage

Hi @Anonymous 

 

Why not try a custom column 

if Text.Contains([Status], "Backlog") then "Backlog else
if Text.Contains([Status], "Archived") then "Archived" else [Status]

 

Thanks

Joe

If this post helps, then please Accept it as the solution

 

View solution in original post

3 REPLIES 3
mlsx4
Super User
Super User

Hi @Anonymous 

 

If you only need the first word, you can extract text before delimiter, and use "space" as char

JoeBarry
Solution Sage
Solution Sage

Hi @Anonymous 

 

Why not try a custom column 

if Text.Contains([Status], "Backlog") then "Backlog else
if Text.Contains([Status], "Archived") then "Archived" else [Status]

 

Thanks

Joe

If this post helps, then please Accept it as the solution

 

mussaenda
Super User
Super User

Hi @Anonymous 

How are we going to know your standard words? are they only 2 words --Backlog and Archived?

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors