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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If function

So I have many values that I need to assign to a column depending on another column.

if 'Group Description' has 'WR' in it, I need to display 'blank'

if 'Group Description' has 'Support' in it, i need to display 'blank'

etc

etc

etc

So if this one big if statement? And all I wanted to do is search the field group description for specific things, like 'WR' or 'Support' and many others.

Then display something else in my 'Catagory' column.

Can I use wildmatch?

And I would like to do this in the script.

Thanks!

11 Replies
swuehl
Champion III
Champion III

The wildmatch() functions are just used as conditions in the if() statements. So you essentiall need to think about what your conditions are and what you want THEN to do and what ELSE (in the then / else branches, second and third argument to if() statements).

I am not 100% sure what your requirements are, but you could try something like

LOAD *,

if

(wildmatch([GroupDescription],'*Non WR*'), 'Improve/Enhance',

if(wildmatch([GroupDescription],'*Project*'),if(wildmatch([GroupDescription],'*Suite 4*'),'Lean','Projects'),[GroupDescription])) as Metrics_Catagory

INLINE [

GroupDescription

Non WR Test1

Non wr Test2

Non WR sdfdsfsd

Project Suite 4 1

Project Suite 42

Suite 51 Project

Suite 42 Project 2

];

Not applicable
Author

That worked perfectly. Thanks for all the help.

I continue the same pattern if I want to format others as well?