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
BahntjeRuben
Regular Visitor

Column header and data in same row

I ve this type of records:

date=2020-07-28 time=11:35:29 user="user001" msg="Some String With Spaces" logid=100
date=2020-07-28 time=9:15:10 user="user002" msg="Another Text" logid=102

date=2020-07-27 time=10:55:23 user="user001" msg="The quick brown" logid=105

I want to split first line, and use the text before the = sign as headers and then split every row and use the text after the = sign as data. This is the expected result

date                  time         user         msg                                     logid

2020-07-28     11:35:29    user001     Some String With Spaces     100
2020-07-28     9:15:10      user002     Another Text                         102

2020-07-28     10:55:23    user001     The quick brown                   105

Ane idea how to resolve this?

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@BahntjeRuben 

I saved your data as a text file and imported to into PBI, and did the transformation. Please check the steps and codes. This is dynamics, any # of columns and rows will work

 

You can download the file: HERE

 

Annotation 2020-07-29 155847.png

________________________

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

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@BahntjeRuben 

I saved your data as a text file and imported to into PBI, and did the transformation. Please check the steps and codes. This is dynamics, any # of columns and rows will work

 

You can download the file: HERE

 

Annotation 2020-07-29 155847.png

________________________

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

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Must be an easier way than this but you could use Power Query:

 

I'm presuming "date=2020-07-28 time=11:35:29 user="user001" msg="Some String With Spaces" logid=100" is in one cell? if so, 

 

Split by delimited "="

Then split "time", "user", "msg" and "logid" by delimited by Right most "Space". 

 

Karlos_0-1596025376456.png

The just remove the redundant columns and rename the remaining. 

Karlos_1-1596025413446.png

 

 

 

 

 

 

 

 

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.

Top Solution Authors
Top Kudoed Authors