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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.