Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All.
I have a series of thousands of User Names in a table column and the format is inconsistent and I am cleaning them up in M.
So I am replacing things like "." with " " or "," with "" or changing all the strings which are entirely lowercase to Proper Case etc.
One of the remaining challenges is detecting where there is a change of Case and I want to add a space.
i.e. "SmithJ" I want to be changed to "Smith J" or "FredSmith" I want to be changed to "Fred Smith" to make the format consistent.
Since there are no wildcard options for case, and the position is completely random, struggling to think of a simple solution.
Any suggestions? Happy for a solution in either M or DAX.
Thanks in advance.
Solved! Go to Solution.
Text.Combine(Splitter.SplitTextByCharacterTransition({"a".."z"},{"A".."Z"})("SmithJ")," ")
Yes thanks. I already detected the Mc issue but hadnt thought of Mac.
Thanks I didn't see that prebuilt option in the Menu
Split Column > By Lowercase to Uppercase would be the analogous option.
Side note: Be careful with names like McCall or MacBride.
Text.Combine(Splitter.SplitTextByCharacterTransition({"a".."z"},{"A".."Z"})("SmithJ")," ")