Forum Discussion

littleboozer's avatar
littleboozer
New Member
2 years ago
Solved

Help with converting number to negative based on another column value.

Hi All,

 

I am new to this so my question could be very basic. I am trying to create a new custom column to display the numbers from a column named "actual amount" in either negative or positive values, based on a value "Outgoing" from a column called "payment direction.

 

How can I do that, please? I have ssen other topics about this but I can't seem to get this to work for me. Thanks.

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    = Table.AddColumn(PriorStepOrTableName, "Actual Amount", each if [Direction] = "Outgoing" then [Amount] * -1 else Amount)

     

    --Nate

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    = Table.AddColumn(PriorStepOrTableName, "Actual Amount", each if [Direction] = "Outgoing" then [Amount] * -1 else Amount)

     

    --Nate