Forum

Import unstructured...
 
Notifications
Clear all

Import unstructured text report with power query

5 Posts
2 Users
0 Reactions
58 Views
(@ing7t)
Posts: 3
Active Member
Topic starter
 

Hi, 

I tried to import the attached .TXT report; the measurements are repeated for each parameter: PARAM1, PARAM2, PARAM3.

I removed unuseful rows and cleaned up the data as much as I could. I only need the parameters' names and don't need their Descriptions or Units.

I don't know how to transform the data to obtain a table with a header like: PARAMS, EVNT, POINTS, MEAN, AMP, AVG, OSC, PEAK1, PEAK2, LOW, HIGH, REF.

I unsuccessfully tried to bring the three PARAMs in a column. Any help is greatly appreciated.

 

Thank you,

Emil

 
Posted : 19/08/2020 2:27 pm
(@ing7t)
Posts: 3
Active Member
Topic starter
 

I managed somehow to transform (unpivot) the data the way I wanted. It seems a long and convoluted way. If someone comes up with a better way I'll appreciate it. 

Thank you,

Emil

 
Posted : 19/08/2020 6:30 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Emil,

Welcome to our forum! It's great to see you're having a go yourself. You can simplify the query by using Split Column by Position. See example file attached - connection only query 'DATA-2'.

Note: you'll need to change the file path back to your own PC's directory.

Mynda

 
Posted : 19/08/2020 11:20 pm
(@ing7t)
Posts: 3
Active Member
Topic starter
 

Hi Mynda,

 

Thank you for your prompt response! Your solution is a lot simpler than my approach. Newbies like me cannot see the forest because of the trees.

I like the Conditional Custom Column idea.

I enjoy your Power Query course !

Thank you!

Emil

 
Posted : 20/08/2020 8:31 am
(@mynda)
Posts: 4761
Member Admin
 

You're welcome, Emil. It all comes with practice and you're practicing, so that's the most important thing 🙂

 
Posted : 20/08/2020 9:56 pm
Share: