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
jmcp
Frequent Visitor

Splitting out column data to show as 2 columns for a table.

Hi

 

Is anyone able to help me understand how i can take the data in one column and split it into 2 columns?  i need to create a table that shows the 2 column headings.

 

My column has say, Data 1 and Data 2 as the text values  but they are in separate cells and i need to display them separately in 2 columns. 

 

Apologies if this seems simple but all i can find are references to delimiters which doesn't seem to work in this case.

1 ACCEPTED SOLUTION

Hi @jmcp 

 

I think you are after a pivot column function in power query - here are the steps.

Hope this helps. ( and yes, snipping and pasting doesn't work, you need to save an image to upload it) 


2019-07-22_19-21-22.jpg

View solution in original post

7 REPLIES 7
mwimberger
Resolver II
Resolver II

Hi @jmcp 

If I understand your post correctly you need to split a column into two based on something that doesn't have delimiters, and then use the top row as the column headings. 

This is achievable a number of ways in Power Query which is simpler than doing it in DAX.

 

Split Column in the Transform tab of Power Query offers numerous ways to split a column including using delimiters or even number of characters.

If you need to use the first row of the data you imported as a header, use the "Use First Row as Headers" also under the transform tab under the Table group.

If it is something more complicated than this please post some more detail so we can assist.

 

Cheers

 

Manfred

 

Anonymous
Not applicable

Hi @jmcp It'll be helpful if you could post a screenshot of the columns you're talking about, and also maybe manually show what you want your output to be

AiolosZhao
Memorable Member
Memorable Member

Hi @jmcp ,

 

is this what you want?

Splitting out column data to show as 2 columns for a table..PNG

 

Aiolos Zhao





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

Proud to be a Super User!




Hi

 

Thanks for replying!   i think so ,   but im still not quite sure which option works.

So i have one column containing thousands of Direct and Non-Direct text in the 'cells'  - i can't quite see the option which splits the Non-Direct cells into their own column.

 

Direct

Non-Direct

 

 

@jmcp 

 

I think I get your question now - the two values are direct and indirect are below each other in the same cell. Something like this :

2019-07-22_17-23-14.jpg

In this case you can still use Power Query and here is how to split by carriage returns:

2019-07-22_17-26-26.jpg

Hope I understood your question correctly

 

Cheers

 

Manfred

Hi Manfred

 

Thanks for responding  -  the values are in separate cells but below each other. 

 

Sorry - i'm having trouble pasting a snip to the page here.

Hi @jmcp 

 

I think you are after a pivot column function in power query - here are the steps.

Hope this helps. ( and yes, snipping and pasting doesn't work, you need to save an image to upload it) 


2019-07-22_19-21-22.jpg

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.