Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklearnervir
Creator
Creator

GetField selection with Multiple IF Statement

Hi ,

I want to build an epression with multiple if where i want to select diffeent values and different outcome Like.

//IF(GetFieldSelections(WK) = '26',Date(Num(Today())+26*7,'DD/MM/YYYY'),'') OR

//IF(GetFieldSelections(WK) = '15',Date(Num(Today())+15*7,'DD/MM/YYYY'),'') OR

//IF(GetFieldSelections(WK) = '8',Date(Num(Today())+8*7,'DD/MM/YYYY'),'')

but OR Condition is not working .

I have created on1 list box with values like 26,15,8 and while click on 26 i want to manipulate out according to 26 and ame for 15 and 8....

please suggest......

7 Replies
MK_QSL
MVP
MVP

Something Like below

IF(GetFieldSelections(WK) = '26',Date(Num(Today())+26*7,'DD/MM/YYYY'),''),

IF(GetFieldSelections(WK) = '15',Date(Num(Today())+15*7,'DD/MM/YYYY'),''),

IF(GetFieldSelections(WK) = '8',Date(Num(Today())+8*7,'DD/MM/YYYY'),'')))

Check the ))) must be according to your IF

jonathandienst
Partner - Champion III
Partner - Champion III

Manish, I think you meant this:

IF(GetFieldSelections(WK) = '26',Date(Num(Today())+26*7,'DD/MM/YYYY'),

IF(GetFieldSelections(WK) = '15',Date(Num(Today())+15*7,'DD/MM/YYYY'),

IF(GetFieldSelections(WK) = '8',Date(Num(Today())+8*7,'DD/MM/YYYY'),'')))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Kushal_Chawda

may be like this

if(pick (match(GetFieldSelections(WK),'26','15','8'),

Date(Num(Today())+26*7,'DD/MM/YYYY'),

Date(Num(Today())+15*7,'DD/MM/YYYY'),

Date(Num(Today())+8*7,'DD/MM/YYYY')),'')

jonathandienst
Partner - Champion III
Partner - Champion III

You can simplify that further:

=If(Match(GetFieldSelections(WK),'26','15','8'), Date(Num(Today())+WK*7,'DD/MM/YYYY'))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qlikviewwizard
Master II
Master II

Hi qliklearnervir

Did you get the answer?

qliklearnervir
Creator
Creator
Author

yes

Ashutosh7777
Partner - Contributor
Partner - Contributor

which one is working properly

thanks