Help with Derived Column Expression

  • This is working great but I need to add another piece and my brain just cant get it. So, Thanks

    ([CONV CODECURNRC] == "CAD" ? [CONV AMTNETTOT] - [CONV Payments] : ([CONV AMTNETTOT] - [CONV Payments]) * [CONV EXCHRATEHC])

    What I need to do is evaluate the above statement and if it evaluates to < = 0 THEN 0, Otherwise evaluate just the above statement.

  • You could add another level of nesting:

    Expression < 0 ? 0 : Expression

    where expression is the entire statement you currently have.

    Or - slightly unorthodox - add another derived column transformation after this one and you can build another expression using the column you have just created. Avoids the nasty nesting.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • I figured this one out by using the && operator. Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply