A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
have a look at this... replacing multiple currency symbols with a blank value in your report, you can use a list of currency symbols and apply a single transformation step using the List.Accumulate function. Here's an example of how you can modify your code to achieve this:
Source = Excel.CurrentWorkbook(){[Name="Table1\_2"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source, {{"Payment", type text}}),
currencySymbols = {"Rs.", "RM", "ï¿¥", "Php", "Rp", "£", "HK$", "¤", "NT$", "₩", "د.Ø¥.â€", "฿"},
#"Replaced Value" = Table.TransformColumns(#"Changed Type", {{"Payment", each List.Accumulate(currencySymbols, \_, (state, current) => Text.Replace(state, current, ""))}})
in
#"Replaced Value"```
In the code above, we define a list called currencySymbols that contains all the currency symbols you want to replace. Then, we use the Table.TransformColumns function to transform the "Payment" column by applying the List.Accumulate function. This function iterates over each currency symbol in the currencySymbols list and replaces it with an empty string in the "Payment" column.
By using this approach, you can simplify the code and replace multiple currency symbols in one transformation step.