Add new Power Query functions and update settings for improved data handling
This commit is contained in:
19
power-query/fFixCSVNumbers
Normal file
19
power-query/fFixCSVNumbers
Normal file
@@ -0,0 +1,19 @@
|
||||
let
|
||||
Func = (TableOrText as any, optional ColumnsList as list) => let
|
||||
ChooseMethod = try List.IsEmpty(ColumnsList) otherwise true,
|
||||
ApplyMethod = if ChooseMethod then
|
||||
let
|
||||
ColonToNull = Text.Replace(TableOrText, ",", ""),
|
||||
DotToColon = Text.Replace(ColonToNull, ".", "")
|
||||
in
|
||||
DotToColon
|
||||
else
|
||||
let
|
||||
ColonToNull = Table.ReplaceValue(TableOrText, ",", "" , Replacer.ReplaceText, ColumnsList),
|
||||
DotToColon = Table.ReplaceValue(ColonToNull, ".", ",", Replacer.ReplaceText, ColumnsList)
|
||||
in
|
||||
DotToColon
|
||||
in
|
||||
ApplyMethod
|
||||
in
|
||||
Func
|
||||
Reference in New Issue
Block a user