If-Then-Else

  • I have a DERIVED COLUMN TRANSFORMATION as follows:

    Converted_My_VALUE > 0 ? "X" : "Y"

    Why doesn't this work?

    It only works when the value is Greater than 0, then an "X" is plugged in.

    If it's NOT Greater than 0, then a "Y" should be plugged in, but instead a NULL is inserted.

    Any ideas?

  • Is Converted_My_VALUE always numeric, or is it sometimes NULL? Can you give an example of some of the data it contains when it is failing?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Converted_My_VALUE is a column from an EXCEL file. When I get into it's FORMAT CELL it's defined as GENERAL. It can contain blank or a number..

  • You question made me think just a little more.

    I Googled and found out how to test for NULLs and put that equation in my DERIVED COLUMN test. Then the equation worked!

    Thanks again, Phil !

  • A pleasure, well done for seeing it through.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 5 posts - 1 through 4 (of 4 total)

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