Using power query we can split a column into data that is non digit to digit which works great when you have a value such as Lead 10 to split into Lead and 10 however is there anyway to split in the same way if the number is a decimal e.g. Lead 20.5. Using split non digit to digit splits this is Lead 20. 5
I have the following example data I wish to split as follows:
Lead 20.5 --> `Lead` `20.5`
No Data --> `null`
Arsenic 10 --> `Arsenic` `10`
Gold 50.55 --> `Gold` `50.55`
1,4-Dioxane 21 --> `1,4-Dioxane` `21`
Previously I used split by right most "" however this splits No Data into separate words.
Any ideas on how to achieve this would be great.
M Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Split Column by Character Transition" = Table.SplitColumn(#"Changed Type", "Column1",
Splitter.SplitTextByCharacterTransition((c) => not List.Contains({"0".."9","."}, c), {"0".."9","."}), {"Column1.1", "Column1.2"})
in
#"Split Column by Character Transition"

