Forum Discussion
Power query with txt for messages
- Sep 14, 2023
That didn't work since dates were converted using US locale. With UK locale it work, please see attached. You may change in Change Type with Locale step.
Please find query in attached file. in Source step change file path on your one. Result is
Thank you very much for your proposal. Unfortunately, it didn't work when I added more lines to the text.
Could you tell me what went wrong?
This is the txt link
https://1drv.ms/t/s!AlPgnUYDBAuukhKK6qg6BPr41SqM?e=VRz89g
Juan
- SergeiBaklanSep 15, 2023Diamond Contributor
juan jimenez It looks like works since post is accepted. Good luck!
- juan jimenezSep 17, 2023Iron ContributorHello Sergei,
I apologize for insisting on this matter. I've tried importing these sentences, and I noticed that
1) not all the complete texts of the conversations appear, and
2) the order in which they were written has changed.
Could you please take a look at the attached PQ (https://1drv.ms/x/s!AlPgnUYDBAuukh9cF_02HLdlxqmr?e=fgrGGC)
and the txt in this link (https://1drv.ms/t/s!AlPgnUYDBAuukh7twVQBAt4qXE8L?e=KDCsjp)?
Thank you very much, Juan.- SergeiBaklanSep 18, 2023Diamond Contributor
Hi Juan,
I see, that's since we have quotes within the text. Please check "Chat con XXX updated" query in attached.
On third step I used
= Table.AddColumn(FilteredFiles, "Data", each Table.FromColumns({Lines.FromBinary([Content], null, null, 65001)}))instead of csv importing.
On intermediate steps where we split columns QuoteStyle.Csv was changed on QuoteStyle.None.
As for the sorting I kept initial index, on final step sorting is by date, time and Id.
Then you add another file please be sure it has exactly the same structure and applied data types.
- SergeiBaklanSep 14, 2023Diamond Contributor
That didn't work since dates were converted using US locale. With UK locale it work, please see attached. You may change in Change Type with Locale step.