Help building a calculated field

Hi, I am trying to build a calculated field based in this request:

  • where “20Exit” is negative, I’d like to subtract the negative number from “Trans+Agg”

(20EXIT) and (Trans+Agg) are already calculated fields, not sure if that complicates things:

(20EXIT)
ifelse(choice2=“Exit”,-currency1,currency1)

(Trans+Agg) =
ifelse(
currency2 > 0, currency2,
{20EXIT}
)

Hello @dherasme

Essentially you will want something like this:

ifelse(
    {20Exit} < 0, 
    {Trans+Agg} - {20Exit},
    NULL
)

But this might not work based on your data. Can you share what the table looks like?