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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.