Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Simplyfy multiple calls to Table.ReplaceValue

Hi, I wonder if it is possible to simplyfy multiple calls to Table.ReplaceValue by creating one function?   Here are 3 calls to Table.ReplaceValue: #"Encode Id" = Table.ReplaceValue(Source, each ...
  • Smauro's avatar
    5 years ago

    Hi Anonymous 

     

    You could just transform each column in one line, but I do find Table.ReplaceValue to work a bit faster.

    Try this:

    Table.ReplaceValue(
        Source, nullnull,
        (x, y, z) => fnc_ATS_Encode_Id(x, pTR),
        { "Tenant Id""Department Id""Parent Department Id" }
    )