Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please any can any one help me with the below scenario,
I have a scenario, where if a record in a column contains a word "jenkins" then i want to create a new column and mark the particular record as a "bug", if not keep the record as it is.
I tried the below if condition but unfortunately qlik doesn't support wildcards
tried this in table: if(field1 = '*jenkins*', 'bug', field1)
tried this in script: if(field1 = '*jenkins*', 'bug', field1) as 'field2'
Thanks in advance
Thank you @MarcoWedel @henrikalmen @kaushiknsolanki for your help. I'm really thrilled for your prompt response. The above like and wildmatch functions worked like a magic. They satisfied the requirement. Thanks again. All the best. 👍
Hi you should try below.
if(wildmatch(field1,'*jenkins*'), 'bug', field1)
Use wildmatch(), it supports wildcards. So something like if(wildmatch(field1, '*jenkins*'), 'bug', field1)
you could also try the 'like'-operator instead of the '=' sign, i.e.:
if(field1 like '*jenkins*', 'bug', field1)
Thank you @MarcoWedel @henrikalmen @kaushiknsolanki for your help. I'm really thrilled for your prompt response. The above like and wildmatch functions worked like a magic. They satisfied the requirement. Thanks again. All the best. 👍
Just wanted to know, is there a way to check whether wildmatch function is efficient or the like function is efficient. As both functions are satisfying the requirement.
Thanks in advance