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
misiek5510
Helper III
Helper III

Split Column by Delimiter ONLY if more then one exists

Hi,

 

I wanted to split the column if dash "-" exist more than once for each row and split it without spliting the first dash. Hopefully the below will make more sense:

 

Example column to be split:

 

Sample

Sample - Sample1 

Sample - Sample1 - Sample2 - Sample3 

Sample - Sample1

Sample - Sample1

Sample - Sample1 - Sample2

 

 

Column that needs to be created:

 

Sample

Sample - Sample1

Sample - Sample1

Sample - Sample1

Sample - Sample1

Sample - Sample1

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@misiek5510 , First Use Split By Delimiter, and split on only 1st occurrence (Into two columns),

 

Then again split By Delimiter the second into rows

 

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

View solution in original post

2 REPLIES 2
Thennarasu_R
Responsive Resident
Responsive Resident

Hi !
@misiek5510 

You Created Calculated Column Using Len and Left Functions
Here Attached the Ex Pic.I hope it Will help to You.

Thennarasu_R_0-1673270647843.png

Thanks,
Thennarasu

amitchandak
Super User
Super User

@misiek5510 , First Use Split By Delimiter, and split on only 1st occurrence (Into two columns),

 

Then again split By Delimiter the second into rows

 

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

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.