Forum Discussion
power query - data cleaning and analysis
- May 15, 2021
i am talking about the fixed width feature as shown belowSergeiBaklan
I did that by couple of iteration and approximately, since we use TRIM() exact position most probably is not required.
However, if you are on Excel with dynamic arrays you add in couple of cells one under another
=SEQUENCE(,LEN(A2),0)
and
=MID(A2,SEQUENCE(,LEN(A2)),1)
It looks like
Positions start from 0 and each next position is first space after the previous field. That's one time job if only your system generates the file always in exactly the same format.
If format is different from time time I guess removing of excess spaces could be done by Power Query but that will require M-script coding.
- samuel_kodjoeMay 14, 2021Copper Contributori would appreciate it so much if the excel "text to column" feature is incorporated into power query
in later versions.- SergeiBaklanMay 15, 2021Diamond Contributor
Actually that is much more powerful Table.SplitColumn() function which could be called from here
- samuel_kodjoeMay 15, 2021Copper Contributor
i am talking about the fixed width feature as shown belowSergeiBaklan