1 Reply Latest reply: Sep 16, 2011 8:06 AM by Stefan Wühl RSS

    How to put the condition?

      Hello There,

       

      I have a filed called tax column. Here I need to put below three conditon into one condtion. How to make them into one condition in the designer part?

       

       

      RT Fare Season 1: $550 (RT = roundtrip)

      RT Fare Season 2: $700

      RT Fare Season 3: $950

        • How to put the condition?
          Stefan Wühl

          Hi Siva,

           

          not sure if I understood completely:

           

          You wanna set the field [tax column] depending on a value you retrieve from a different field (Season?)?

           

          I think you could use a pick / match function combination in your script to achieve this:

           

          LOAD

          ....

          [SeasonField],

          pick(match([SeasonField],'RT Fare Season 1', 'RT Fare Season 2','RT Fare Season 3'),'$550','$700','$950') as [tax column]

          FROM ....;

           

          There are also alternatives, like using a mapping table and applymap, if you got lot of seasons, this would probably better to maintain.

           

          Hope this helps,

          Stefan