Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
ZoeM
Contributor II

Using Match with IF Statement

Hi Community,

I am trying to use the IF and Match statements together to create the below expression:

If(GetFieldSelections(Match( Product,'Explorer','Durango,'Highlander','Pathfinder')),RGB(5,66,117))

so that if the selected items match the requirement, the button will be colored Blue (RGB code above).

I keep getting an error and any help rendered will be appreciated.

Thank you. 

Labels (3)
1 Solution

Accepted Solutions

Re: Using Match with IF Statement

Try this may be

If(WildMatch(GetFieldSelections(Product),'*Explorer*', '*Durango*', '*Highlander*', '*Pathfinder*'), RGB(5,66,117))
3 Replies

Re: Using Match with IF Statement

Try this may be

If(WildMatch(GetFieldSelections(Product),'*Explorer*', '*Durango*', '*Highlander*', '*Pathfinder*'), RGB(5,66,117))
ZoeM
Contributor II

Re: Using Match with IF Statement

Extremely well done there my friend.

Do you mind explaining why we had to use the WildMatch vs. Match?

Re: Using Match with IF Statement

Well, I was not sure if you are going to ever select one value in Product or can you select multiple values as well... if you are going to just select 1 value..... then you can use this

If(Match(GetFieldSelections(Product),'Explorer', 'Durango', 'Highlander', 'Pathfinder'), RGB(5,66,117))