Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
siva_boggarapu
Creator II
Creator II

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

1 Reply
swuehl
MVP
MVP

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