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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ogureisuo
Frequent Visitor

Help with transforming table (columns with semi-colon)

Hello everyone,

I have a table where a semi-colon separates the data inside the columns.
I used SplitTextByDelimiter and then tried to unpivot the table, but I did not have the correct output.
Any ideas please? Thank you so much

 

Input:

IDItem1StartdateEnddate
1AAA ; BBB ; CCC01/01/2022 ; 01/03/2022; 01/05/202201/02/2022 ; 01/04/2022; 01/06/2022
2AA ; BBB01/01/2022 ; 01/03/202201/02/2022 ; 01/04/2022
3BB; CC ; DD ; EE01/06/2022 ; 01/10/2022; 02/01/2022 ; 02/10/202201/09/2022 ; 01/11/2022; 01/31/2022 ; 02/11/2022

 

 

Ouput:

 

IDItem1StartdateEnddate
1AAA01/01/2022 01/02/2022
1BBB01/03/202201/04/2022
1CCC 01/05/202201/06/2022
2AA01/01/2022 01/02/2022
2 BBB01/03/202201/04/2022
3BB01/06/202201/09/2022
3CC01/10/202201/11/2022
3DD02/01/2022 01/31/2022
3EE02/10/202202/11/2022
1 ACCEPTED SOLUTION
davehus
Memorable Member
Memorable Member

Hi @ogureisuo ,

 

Please see example attached, basically I've split by delimter and packaged each once back up again, unpivoted on ID and then split data and removed nulls.

 

Hope this helps.

 

Did I help you today? Please accept my solution and hit the Kudos button.

View solution in original post

4 REPLIES 4
speedramps
Super User
Super User

Well done @davehus 

 

I was working on a solution of my own but I liked how you have merged and unmerge the columns , so I have incorporated that. Hope that is ok?

 

Click here for my alternative solution 

 

My solution firstly unpivots the columns, to put all the values in one column.

Then splits that column by the ; delimiter.   Rather that repeating the split for each column.

Then unpivots,  merges, pivots, splits the merges and finally renames the columns.

 

I think @davehus  should get the kudos for coming up with merge / demerge. Briliant ! 

But I think I have improved it a little. 😀

 

Perhaps there will be other suggestions.

I find it really interesting to see how different  users solve problems.

 

 

speedramps_0-1662505388938.png

speedramps_1-1662505505986.png

 

speedramps_2-1662505759761.png

 

speedramps_3-1662505788433.png

speedramps_4-1662505814918.png

 

😀 😀 😀  😀 

 

speedramps_6-1662505847687.png

 

davehus
Memorable Member
Memorable Member

Hi @ogureisuo ,

 

Please see example attached, basically I've split by delimter and packaged each once back up again, unpivoted on ID and then split data and removed nulls.

 

Hope this helps.

 

Did I help you today? Please accept my solution and hit the Kudos button.

Brilliant solution! Thank you @davehus and @speedramps for the help!! 

Glad we could help.

I have accepted the @davehus solution because he got there first. 

Hope that is ok?

 

I think you can also click the button to accept my solution. Both work.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors