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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
joooffice
Helper I
Helper I

Split column by word

Hi,

 

I have a column containing the names of parents and children merged together that i would like to split into the child and parents names. The split should come before the 'son of' or 'daughter of' but because the number of characters before and after changes and there may or may not be a space between first name and surname before son/daughter I can't split by delimeter. If I have the first name and surname of the child before the son/daughter I need to the keep the whole name so taking just the first word wouldnt work either.

 

Ideally I want to define " "&"son" as my delimeter but I can't work out how to do this (or even just "son" and then I could trim the extra space)

 

Thanks

 

Joe Bloggs son of Dave
Angela Bloggs daughter of Sue
Jack son of Bob
Jason Smith son of Barbara Smith
Claire daughter of Jon
1 ACCEPTED SOLUTION
Anonymous
Not applicable

try this:

 

Table.SplitColumn(#"Changed Type", "Column1", Splitter.SplitTextByAnyDelimiter({"son of","daughter of"}, QuoteStyle.Csv), {"children", "parent"})

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

try this:

 

Table.SplitColumn(#"Changed Type", "Column1", Splitter.SplitTextByAnyDelimiter({"son of","daughter of"}, QuoteStyle.Csv), {"children", "parent"})

 

 

Thanks, so obvious now you've shown me!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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