Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MT4T
Contributor III
Contributor III

Nested if + wildmatch

Hi,

 

I have struggle with this calculated field I need to make.

In first case i need to mark all rows that contains "TBC" in field Customer PO as "DUMMY-COMMITED"

In secon case i need to mar all rows that contains "DUMMY" as "DUMMY"

Rest should be marked as "COMMITED"

Is there any expression that should solve this?

l(If(WildMatch([Customer PO],'TBC'),'DUMMY-COMMITED',(IF(WildMatch([Customer Code],'DUMMY'),'DUMMY','COMMITED'))))

Labels (2)
1 Solution

Accepted Solutions
sidhiq91
Specialist
Specialist

@MT4T As @BrunPierre  mentioned you can just use his logic, or if you wanted to use wildmatch in your expression there is a slight change, please see as below:

if(wildmatch([Customer PO],'*TBC*'),'DUMMY-COMMITED',

if(wildmatch([Customer PO],'*DUMMY*'),'DUMMY','COMMITED'))

View solution in original post

4 Replies
Rockstar7
Partner - Contributor III
Partner - Contributor III

@MT4T 

Provide any sample data to understand better

BrunPierre
Specialist
Specialist

@MT4T Per your logic this simple statement in the script should work

IF([Customer PO]='TBC','DUMMY-COMMITED',
IF([Customer Code]='DUMMY','DUMMY','COMMITED') AS [Field Name]

sidhiq91
Specialist
Specialist

@MT4T As @BrunPierre  mentioned you can just use his logic, or if you wanted to use wildmatch in your expression there is a slight change, please see as below:

if(wildmatch([Customer PO],'*TBC*'),'DUMMY-COMMITED',

if(wildmatch([Customer PO],'*DUMMY*'),'DUMMY','COMMITED'))

MT4T
Contributor III
Contributor III
Author

Thank you, save my day. The missing "*" was an issue.