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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kapil512
Helper II
Helper II

How to split the the Column into Multiple rows.

Hi,

 

Can you please helpw me out in this, i am trying snce two days.

 

I want to split the column data into different rows with same data.

 

Example: Column1|Comun2|Comun3|Column4|

Data: 1|kapil;dev;raj|4|5

Data:2|dev;ram;john;peter|3|5

 

Final out put:

 

1|kapil|4|5

1|dev|4|5

1|raj|4|5

2|dev|3|5

2|ram|3|5

2|john|3|5

2|peter|3|5

 

I have tried the below Logic, and when my expand the table i am seeing lot od duplicate data.

 

Table.AddColumn(#"Replaced Value","Custom",each Table.FromColumns({Text.Split([Answer Choices],";")}))

 

Can anyone please help me out?

 

Thanks,

Kapil

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

in the query editor, I just marked the column and from the context menu of the marked column I chose "Split Coliumn" -> "By Delimiter"

2017-09-16_23-03-51.png

 

From the dialog I chose Advanced Options as shown below

2017-09-16_23-00-03.png

 

This leads to the following result

2017-09-16_23-00-45.png

 

Hope this is what you are looking for

 

Regards

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
TomMartens
Super User
Super User

Hey,

 

in the query editor, I just marked the column and from the context menu of the marked column I chose "Split Coliumn" -> "By Delimiter"

2017-09-16_23-03-51.png

 

From the dialog I chose Advanced Options as shown below

2017-09-16_23-00-03.png

 

This leads to the following result

2017-09-16_23-00-45.png

 

Hope this is what you are looking for

 

Regards

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi,

 

May I know how to do this reverse, like below

 

Table

---------------------------------------

Col1  Col2   Col3  

 1      2019   ab

 2      2019   xy

 3      2018   zd

 4      2017   rt

 5      2019   rt

 6      2017   cv

 

O/P should like

--------------------------------------------

Col1  Col2   Col3  

 1      2019   ab,xy,rt

 2      2019   ab,xy,rt

 3      2018   zd

 4      2017   rt,cv

 5      2019   ab,xy,rt

 6      2017   rt,cv

 

 

 

Thank you So much Tom, its really works like champ..!

 

And i have one more senario, once i split the data into rows, need to calucate the percentage of the column.

 

Let me give you onc example:

 

ABCD 
TRBarriersRisk Risk 
TRBarriersOtherRisk 
TRBarriersBoth DevelopmentRisk 
TRBarriersCataract Development Risk 
TRBarriersRisk Both Development 
TRBarriersOtherBoth Development 
TRBarriersBoth DevelopmentBoth Development 
TRBarriersCataract Development Both Development 

 

In given example A and B is the filters, based those filter i want create a Stacked column chart on X axis for "C" values and for "Y" access i need to calculate of the %. if it is "Risk" that could be 4/8 and if it is "Both Development". 4/8. on "Y" Axis.

 

if this not clear let me know, so that i will share by pbix file to you.

 

Thank you mush for help.

 

Thanks,

Kapil

Hey,

 

I guess it would be really helpful if you could share a pbix, please start a thread, you may call is "Stacked column chart".

 

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thank you Tom.

 

I will do that.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.