Forum Discussion
Power Query or any other solution
- Sep 22, 2024
anupambit1797 In case you are still interested in a PQ solution, the attached file contains a pretty straight-forward one. Just change the source path to the correct location on your own system and see it it produces the correct results.
anupambit1797 In case you are still interested in a PQ solution, the attached file contains a pretty straight-forward one. Just change the source path to the correct location on your own system and see it it produces the correct results.
- anupambit1797Sep 27, 2024Iron Contributor
Thanks Riny_van_Eekelen , If I may ask on the same question:-
Q1) How to add a Column for the corresponding Length for each line?
I tried to do the same , but it fetch me an Err as below
Q2) Secondly , if I want to add a Column with the Number of (Count of ) "|" in each string/line how to achieve that?
Feel free to use the same sample txt file for the above exercise..
Many Thanks in Advance,
Br,
Anupam
- Riny_van_EekelenSep 28, 2024Platinum Contributor
Regarding 1, I did this:
= Table.AddColumn(Source, "Length", each Text.Length([Column1]), Int64.Type)It seems you are missing some parentheses.
Regarding 2, I did this:
= Table.AddColumn(Source, "Custom", each Text.Length (Text.Select ([Column1], "|")))