Forum Discussion
Anonymous
4 years agoNot applicable
duplicate or parse a column with different length characters
I have a column with an assortment of the following example data. null R266A0744 S2370B1030 S4273A0940 This data represents (Model R,S2,S4)(Julian date 3 char)(Machine 1 char)(Time 4 char...
- 4 years ago
You would need to write something along the lines of this:
if Text.Length([data column]) = 9 then Text.Start([data column],1) else Text.Start([data column]2)Then do the same fo rthe other 3 parts, but using Text.Middle([data column],2,3) or whatever.
Just remember in Power Query, it starts counting at 0, so to get the 2nd and 3rd char, it would be Text.Middle([data column], 1, 2) (2nd column, 2 chars)
edhans
Community Champion
4 years agoYou would need to write something along the lines of this:
if Text.Length([data column]) = 9 then Text.Start([data column],1) else Text.Start([data column]2)
Then do the same fo rthe other 3 parts, but using Text.Middle([data column],2,3) or whatever.
Just remember in Power Query, it starts counting at 0, so to get the 2nd and 3rd char, it would be Text.Middle([data column], 1, 2) (2nd column, 2 chars)