Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

patriciousa
Contributor

New field bases on specific value in cell/text

Hi community.

I need to do a new field on the load tab with the following data:

Name
asdaddsaDONT USE
asdDONT USEasd
DONT USEasdsasd
asdsaddadasdsadsa
asddsadsad
asd(DONT USE!)asddas
OPENasdasd
asddsaOPENasdsad

The fields I need would be "Name DONT USE" and "Name Open".

If the words DONT USE or OPEN would be at the beggining or the end I would use =RIGHT or =LEFT but it is not the case.

I have tried using if(wildmatch)) but I'm not doing it correctly.

Any help would be appreciate.

Thank you in advance.

Regards.

1 Solution

Accepted Solutions
kerdoncuff
New Contributor III

Re: New field bases on specific value in cell/text

Yes it's case sensitive. You can use the upper function to put your field in capital letters.

if(SubStringCount(upper(Name),'DONT USE')>0,'DONT USE',if(SubStringCount(upper(Name),'OPEN')>0,'OPEN',))

4 Replies
kerdoncuff
New Contributor III

Re: New field bases on specific value in cell/text

Hi,

you can use SubStringCount() function like this :

if(SubStringCount(Name,'DONT USE')>0,'DONT USE',if(SubStringCount(Name,'OPEN')>0,'OPEN',))

patriciousa
Contributor

Re: New field bases on specific value in cell/text

Thank you Anne.

Is it case sensitive? I just realise that I have Open, OPEN, oPEN, open, etc... the same goes for dont use.

Thank you.

kerdoncuff
New Contributor III

Re: New field bases on specific value in cell/text

Yes it's case sensitive. You can use the upper function to put your field in capital letters.

if(SubStringCount(upper(Name),'DONT USE')>0,'DONT USE',if(SubStringCount(upper(Name),'OPEN')>0,'OPEN',))

patriciousa
Contributor

Re: New field bases on specific value in cell/text

It worked like a charm.

Thank you Anne.