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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rishabjain237
Helper I
Helper I

Splitting a column in Power BI based on a condition

Hi community,
I have a column which has Google analytics event names
It contains event names as :
rd_dwn_smpl_key_trends_form_submit
rd_dwn_smpl_left_red_form_submit
rd_dwn_smpl_top_blue_from_submit
rd_dwn_smpl_key_trends_form_open
rd_dwn_smpl_top_blue_form_open
rd_dwn_smpl_left_red_from_open

as we can see there is a spelling mistake in the event names,
I want to split this column based on a condition.
if the row contains "form" in it then split using delimiter as "form" 
if the row contains "from" in it then split using delimiter as "from"


Thanks and Regards,
rishab jain

1 ACCEPTED SOLUTION

Hi @rishabjain237 

No the QuoteStyle.Csv is not missing, I'm suggesting you use another splitter, change it to Splitter.SplitTextByAnyDelimiter as illustrated in my previous reply

View solution in original post

3 REPLIES 3
rishabjain237
Helper I
Helper I

rishabjain237_0-1698670360069.png

I think the  QuoteStyle.Csv is missing here.
@m_dekorte 

Hi @rishabjain237 

No the QuoteStyle.Csv is not missing, I'm suggesting you use another splitter, change it to Splitter.SplitTextByAnyDelimiter as illustrated in my previous reply

m_dekorte
Super User
Super User

Hi @rishabjain237 ,

Create a split column step with the User Interface using one of the words, then update the section made bold to the expression below:


Table.SplitColumn( prevStepName, "ColName", Splitter.SplitTextByAnyDelimiter({"form", "from"}), {"Event1", "Event2"})

 

I hope this is helpful

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.