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
Anonymous
Not applicable

Transposing Data

Hello, 

I am having trouble figuring this out.

 

How data is currently laid out in Excel:

 

Column A      Column B

155                10 Dwight Rd

155                15 Phyllis drive

1566              24 Stanley Road

1566              233 Pam & Jim Court

 

What I am trying to get data layout to be:

Column A      Column B                       Column C.......        Column (However many needed)

155               10 Dwight Rd                 15 Phyllis Drive

1566              24 Stanley Road            233 Pam & Jim Court

 

Column A is the key for each address and each key can have multiple addresses as shown above. Some have ten addresses others have as low as one. 

 

Thank you for any help you may give.

6 REPLIES 6
Padycosmos
Solution Sage
Solution Sage

In Power Query please do the following :

Padycosmos_0-1677095658540.png

In the query window, delete everything and  paste the code below

= Table.Group(#"Changed Type", {"Column A"}, {{"Column B", each Text.Combine([Column B],","), type nullable text}})

 

Then rightclick on the above step in the applied steps pane >> Insert step After and  paste the code below:

 

= Table.SplitColumn(#"Custom1", "Column B", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Column B.1", "Column B.2"})

Anonymous
Not applicable

Hi,

 

I am attempting. Each time I get an error stating " The name 'Changed Type' wasn't recognized"

Instead of Changed Type, type the name of the last step . If you could send the screenshot of the applied steps I can help you

amitchandak
Super User
Super User

@Anonymous , Create a sub category index and then you can use that to pivot or create a matrix column

https://www.youtube.com/watch?v=7CqXdSEN2k4

 

then pivot

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Or use Matrix visual

 

Anonymous
Not applicable

Thank you, I watched the first video and was able to follow and get to having a index column. I still don't understande the secdond part which actually trasposes this data. Any suggestions? 

@Anonymous , Please find the attached file. I have created two solutions (2 Tables)

 

Please open power query and check steps. Also check Matrix visual

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.