New Calculated field with complex IF function

New Calculated field with complex IF function

Hi,

I have a table with two columns:

- "Sales ID"
- "Sales amount"

When a sale is done I get a new record
When a sale is refunded I get an additional record with the same "Sales ID" but a negative "Sales amount"

I need to:

Add a new calculated column in the SAME table. The calculation should add the text 'cancelled sale' in both transactions (based on "Sales ID" match) when a sale is cancelled (negative value)

An example:

Current Table

Sales ID      Sales amount
123                 18.2
124                  7.3
123                  -18.2
125                  25.0


Expected Table:


Sales ID      Sales amount      Cancelled Transactions
123                 18.2                  cancelled
124                  7.3
123                  -18.2                 cancelled
125                  25.0


Thanks :-)