Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Optimizing Wildmatch

Hi Friends,

Iam new to qliksense, could you please help how to optimize the below wildmatch.

IF(Unit='myunit' AND WildMatch (section,'*100*','*101*','*103*','*104*','*105*','*106*','*107*','*108*','*109*','*110*','*111*') , DUAL('VIP Unit',1),
IFUnit='myunit' AND WildMatch (section,'*172*','*173*','*174*','*175*','*176*','*177*','*178*','*179*','*180*','*181*','*182*','*183*','*184*','*185*','*186*','*187*','*188*','*189*','*190*'), DUAL('Director Unit',2))) AS UnitSUB_unit

 

4 Replies
Anil_Babu_Samineni

Below one will make better.

 

Pick(Wildmatch(section,'*100*','*101*','*103*','*104*','*105*','*106*','*107*','*108*','*109*','*110*','*111*')+1, DUAL('Director Unit',2), DUAL('VIP Unit',1))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It looks good to me as is. Do you have a concern?

If you can show what the entire section value looks like, I may have a suggestion.

 

-Rob

Anonymous
Not applicable
Author

I have around 50 such if and pick wildmatch selections. is there any other function to optimize the script
marcus_sommer

You could use a mapping, see: Mapping-and-not-the-geographical-kind

- Marcus