Forum Discussion
Splitting Column Assistance
- Anonymous8 years ago
What about this?
Table.AddColumn(<Previous Step>, "Position to Split", each List.PositionOfAny([UsernameColumn], {"0","1","2","3","4","5","6","7","8","9"}, Occurrence.First), Int64.Type),This should return the 0-based offset of where the first # shows up in the name. Basically, it's looking in the UserNameColumn for any instance of those 10 numbers (formatted as text).
Then you can add the 2 columns using this [Position to Split] and Text.Start() and Text.End() to grab the right number of characters. You'll probably need Text.Length() as well.
Okay, that does help I see where you are going with it. This is a very dumb question but the "USERNAME" is not limited to username it would be jbsmith, knjohnson then have a number following it such as knjohnson17 or jbsmith22.
What about this?
Table.AddColumn(<Previous Step>, "Position to Split", each List.PositionOfAny([UsernameColumn], {"0","1","2","3","4","5","6","7","8","9"}, Occurrence.First), Int64.Type),This should return the 0-based offset of where the first # shows up in the name. Basically, it's looking in the UserNameColumn for any instance of those 10 numbers (formatted as text).
Then you can add the 2 columns using this [Position to Split] and Text.Start() and Text.End() to grab the right number of characters. You'll probably need Text.Length() as well.