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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.