Forum Discussion

Olha_Protsak's avatar
Olha_Protsak
Frequent Visitor
4 years ago
Solved

Multiply column in the same column using a filter or if clause

Hello Community,   I was wondering if there is a possibility to multiply columns by constant in the same column with using a FILTER?   So I have a banch of countries in my table, and I need to ch...
  • BA_Pete's avatar
    4 years ago

    Hi Olha_Protsak ,

     

    I think you want to use Table.ReplaceValue, something like this:

    = Table.ReplaceValue(
        previousStep,
        each [Total of Capsules_L],
        each if [Legal Entity Label (Entity)] = "Germany"
            then [Total of Capsules_L] * 1000
            else [Total of Capsules_L],
        Replacer.ReplaceValue,
        {"Total of Capsules_L"}
    )

     

    Pete