Forum Discussion
How to use expression (x,y,z)
Why do you need another function?
Replace body of your function with this (as you can see I haven't used let in block because it is not necessary if ther is only 1 step).
(inputTable as table, InputColumnToChange1 as text)=>
Table.ReplaceValue(inputTable, "Bronze", "StSt 316L", Replacer.ReplaceText, {InputColumnToChange1})
If you can provide sample data in usable format and expected result based on sample data, maybe we can create whole query for you.
My target is to have multiple steps, as written here:
(
Input_Table as table,
InputColumnToChange1 as text,
InputColumnToChange2 as text
) =>
let
List1 = Input_Table[InputColumnToChange1],
List2 = Input_Table[InputColumnToChange2],
NewTable1 = Table.ReplaceValue (
Input_Table,
each [List1],
each if [List1] = "Bronze"
then "StSt 316L"
else [List1],
Replacer.ReplaceText,
{List1}
),
NewTable2 = Table.ReplaceValue (
NewTable1,
each [List2],
each if [List2] = "Bronze"
then "StSt 316L"
else [List2],
Replacer.ReplaceText,
{List2}
)in NewTable2
I want to invoke them in this way:
let
Source = #"Query1 (2)"(Summary_Volumes, "Body_Material", "Stuffing_Box_Material")
in
Source
but I don't understand why I have the error message:
Could you support me on the error?
Thanks.
- dufoq31 year agoCommunity Champion
If you want my help I don't need your query. I need sample data and expected result based on that.
- Mic19791 year agoPost Partisan
Sorry, how to add a sample file?
- lbendlin1 year agoSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- lbendlin1 year agoSuper User
Just pointing out that Replacer.ReplaceText is likely not what you want.