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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Transposing Text Data

Hello,

 

I'm trying to transpose some data from a text file and I haven't had any luck finding a solution. I want to generate a standard table for this data. So every row becomes a column and then the data is filled in with a new row. So far all I get is one row with hundreds of columns.

 

The data is a text file that looks like this:

 

Value1 Value2
----------------
Device ID: Value1
IP Address: 192.168.0.0
IPv6 Address: 0000::0000:0000:0000:0000
Platform: Value2, Abilities: Value3
Interface: Value5, Address ID: Value4
IP Platform Addresses:
IP Address: 192.168.0.0
----------------
Device ID: Value1
IP Address: 192.168.0.0
IPv6 Address: 0000::0000:0000:0000:0000
Platform: Value2, Abilities: Value3
Interface: Value5, Address ID: Value4
IP Platform Addresses:
IP Address: 192.168.0.0
----------------
Device ID: Value1
IP Address: 192.168.0.0
IPv6 Address: 0000::0000:0000:0000:0000
Platform: Value2, Abilities: Value3
Interface: Value5, Address ID: Value4
IP Platform Addresses:
IP Address: 192.168.0.0
----------------
Device ID: Value1
IP Address: 192.168.0.0
IPv6 Address: 0000::0000:0000:0000:0000
Platform: Value2, Abilities: Value3
Interface: Value5, Address ID: Value4
IP Platform Addresses:
IP Address: 192.168.0.
----------------
Device ID: Value1
IP Address: 192.168.0.0
IPv6 Address: 0000::0000:0000:0000:0000
Platform: Value2, Abilities: Value3
Interface: Value5, Address ID: Value4
IP Platform Addresses:
IP Address: 192.168.0.0
----------------
Value1 Value2
----------------
Device ID: Value1
IP Address: 192.168.0.0
IPv6 Address: 0000::0000:0000:0000:0000
Platform: Value2, Abilities: Value3
Interface: Value5, Address ID: Value4
IP Platform Addresses:
IP Address: 192.168.0.0

 

 

What I'm looking for is something like this:

MainHeaderDevice IDIP AddressIPv6 AddressPlatformAbilitiesInterfaceAddress IDIP Platform Addresses
Value1 Value2Value1IPIPValue2Value3Value5Value5IP
 Value1IPIPValue2Value3Value5Value5IP
 

Value1

IPIPValue2Value3Value5Value5IP

 

I'm sure this is pretty straight forward but I'm not having any luck. 

 

Also, is there a good book for learning how to transpose data? the one I'm currently reading is DAX only so it doesn't cover it.

 

Thanks.

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous - So I believe @ImkeF 's general solution to this is to create a counter column that numbers your rows with repeating so like MOD 7 essentially. Then you pivot/transpose based upon that column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous - So I believe @ImkeF 's general solution to this is to create a counter column that numbers your rows with repeating so like MOD 7 essentially. Then you pivot/transpose based upon that column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Greg,

 

Would this be an index column where each column has a unique value?

@Anonymous - Yes, I would start with an Index column. See this

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.