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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF statement with GetFieldSelection

Hi

I am trying to create an IF statement where a GetFieldSelections [YearSmall] includes '14/15' .

This seems straight forward when the GetFieldSelections is equal to '14/15' as below

=IF(GetFieldSelections(YearSmall) = '14/15' or GetFieldSelections(Year) = '2014',30)  but this does not then work if multiple selections are made on [YearSmall]

Many thanks

3 Replies
yduval75
Partner - Creator III
Partner - Creator III

If(index(GetFieldSelections(YearSmall), '14/15')) > 0

MK_QSL
MVP
MVP

=IF(SubStringCount(Concat(Distinct GetFieldSelections(YearSmall),'|'),'14/15') or SubStringCount(Concat(Distinct GetFieldSelections(Year),'|'),'2014'),30,'')

SunilChauhan
Champion II
Champion II

=IF(GetFieldSelections(YearSmall) = '14/15' and GetFieldSelections(Year) = '2014',30)

Sunil Chauhan