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
amirghaderi
Helper IV
Helper IV

Split Column by Character, not all cells have the character

I want to split the below cell in dataflow into three columns. When I try to split the column using the split column, it get splitted as below which is wrong.

ColumnA
Date1|Date2|Text
Text

 

 ColumnAColumn BColumn C
IncorrectDate1Date2Text
 Text  

 

 

I would like to split it in the below format. Any suggestion?

 ColumnAColumn BColumn C
CorrectDate1Date2Text
   Text

 

 

1 REPLY 1
collinq
Super User
Super User

Hey @amirghaderi ,

 

I would do this in a few steps.  First step would be to add a new column with a conditional type one that would be like "if no '|' then put data in new column (A) ".  Second step would be to split existing column based on '|' to three new columns (B,C and D).  Third step is to do a fourth column - if A is null, then D else A.  Then, you can remove the original column that started all of this and remove A.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




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.

Top Solution Authors