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: 
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