11 Replies Latest reply: Feb 8, 2016 10:12 AM by Petter Skjolden RSS

    If , Then, Else ... In LOAD

    xavier hemelaar

      Hi Qlikers,

      I'm wondering if it il possible to use IF, THEN, ELSE in LOAD.

      This is what I’m trying to do:

      LOAD

      if "Test" = 'empty' then

        if "Test2" = 'empty' then

        'Empty'

        Else

        'New'

        End if

      Else

      'OLD'

      End if AS "Test3"

      FROM ...

      Is there something wrong with my syntax, or the only possible way iln LOAD  is to do

      LOAD

      If("Test"= 'empty', if (“Test2”=’empty’, ’empty’,’New’),’OLD’) as "Test3"

      FROM ...

      Thanks for your help