Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
rachelpurple
Partner - Contributor III
Partner - Contributor III

If contains, else in load

I want to create a new column N that would look at the value of Column A, if Column A contains stream as 'abc', then the value of Column N should be 'Yes', if not contain 'abc', the value should be 'No'.

In excel, for Column N it is something like: =IF(ISNUMBER(SEARCH("abc",A1)),"Yes","No").

I want to do that in Qlik by adding a new Column and call it 'N'. How to do that? Thanks in advance

1 Solution

Accepted Solutions
el_aprendiz111
Specialist
Specialist

Hi Luda,

1 option:

tmp:
LOAD *, IF(WildMatch(MyField,'*ABC*'),'YES','NO') AS NewField;
LOAD * Inline
[
MyField
ABCDEF
123ABC
DES123
HNT6778
098FBGG
OOOABC
]
;


ysnp.png

View solution in original post

6 Replies
psilva001
Creator
Creator

IF(A='abc', 'Yes', 'No')                    AS          N

el_aprendiz111
Specialist
Specialist

Hi Luda,

1 option:

tmp:
LOAD *, IF(WildMatch(MyField,'*ABC*'),'YES','NO') AS NewField;
LOAD * Inline
[
MyField
ABCDEF
123ABC
DES123
HNT6778
098FBGG
OOOABC
]
;


ysnp.png

MarcoWedel

If(Index(A,'abc'),'Yes','No') as N

hope this helps

regards

Marco

rachelpurple
Partner - Contributor III
Partner - Contributor III
Author

Thanks very much, it works!

rachelpurple
Partner - Contributor III
Partner - Contributor III
Author

Thanks very much, it works!

vishsaggi
Champion III
Champion III

Hello Gan, can you close the thread marking correct/helpful responses accordingly.

Thanks
V.