Attached an extract from a giant txt file,
we want to get proper file for reporting the data?
how to get the eigenaar field repeated in a column
how to get the VRD.PLA. field repeated in a column
how to append the data from the right columns
See if this works for you. Note that you might have to adjust the split positions a little…
To add columnt for the “eigenaar” and “VRD.PLA.” I used conditional logic like so:
if Text.StartsWith([Column1], "0EIGENAAR :") then
Text.AfterDelimiter([Column1], "0EIGENAAR : ") else
null
)
I’ve added 2 support queries containing column names as a list. Below the end result. You will need to do a bit of clean up like removing spaces, setting appropriate data types but this should get you started.
See attached PBIX where I have worked through the request. I just saw that @Melissa had slipped in while I was working on this She is the master, so all the below may be academic
Eigenaar and VRD
apply an index column named RowNumber at the beginning.
Filter just Eigenaar and VRD
Create a Row From And Row To column then build a list in each row of all numbers from Row From and Row To
Expand List to create a table and then use this to merge the original table and apply the references to each row.
Block of Data on Right
Split the data colum with * as delimiter and delete one of the cols and save query.
Do this again saving the other column
Append previous 2 queries into one and then split the column of data
The only bit I can’t quite crack is the final splitting, probably beacuse I’m using a UK keyboard and the data is Dutch so dec places are commas.
Melissa
I have some issues with the file maybe because I send you only extract of the original file
the pbix crashes or results in an empty table
I upload the original file could you take a look at it please
could you please check if your solution pbix file works on the complete Txt file? for the “voorraadplaats 3WA” the data on the right side is not picked up
Melissa
I changed the file location and the query works fine ( i get 11463 records) but when i click close and apply power BI shuts down. If i choose copy entire table i just get the first 999 rows