Forum Discussion

powerbricco's avatar
powerbricco
Advocate I
1 year ago
Solved

change column value based on condition

Dear All, I have a table that looks like this: Code Value1 Value2 0001 100 200 0002 50 500 0003 10 20 0004 150 300   I'd like a condition in Power Query for which: ...
  • parry2k's avatar
    1 year ago

    powerbricco add a replace value step and change it as shown below, do it for both value 1 and value 2

     

    = Table.ReplaceValue(#"Changed Type",each [Value1],each if [Code] = 3 then [Value1] / 12 else [Value1], Replacer.ReplaceValue,{"Value1"})