Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Need only capitial text data from column

Hi Everyone,

I have the data like below:

Table:

Load * inline

[

COMPANY

abc corp

ABC CORP

TCP inc

In tcp inc

Google Inc

];

Load *,

if(wildmatch(COMPANY,'ABC','TCP'),'YES','NO') AS DERIVED_COMPANY

Resident Table;

DROP Table Table;

Req: I need capture 'ABC','TCP' from the field COMPANY.That means only capital text.If its CAPS text then i need to show YES else NO

If i select YES in front end only ABC CORP and TCP inc should come.In NO case remaining all.

Plz correct my above formula.

More Thanks,

Ajay

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Table:

Load * inline

[

COMPANY

abc corp

ABC CORP

TCP inc

In tcp inc

Google Inc

];

Load *,

  If(WildMatch(PurgeChar(COMPANY, 'abcdefghijklmnopqrstuvwxyz'),'*ABC*','*TCP*'),'YES','NO') as DERIVED_COMPANY

Resident Table;

DROP Table Table;


Output:


Capture.PNG

View solution in original post

4 Replies
swuehl
MVP
MVP

You need to add wild card *:

Load *,

if(wildmatch(COMPANY,'*ABC*','*TCP*'),'YES','NO') AS DERIVED_COMPANY

Resident Table;

edit: Ah, I haven't considered that wildmatch performs case insensitive matching.

sunny_talwar

Try this:

Table:

Load * inline

[

COMPANY

abc corp

ABC CORP

TCP inc

In tcp inc

Google Inc

];

Load *,

  If(WildMatch(PurgeChar(COMPANY, 'abcdefghijklmnopqrstuvwxyz'),'*ABC*','*TCP*'),'YES','NO') as DERIVED_COMPANY

Resident Table;

DROP Table Table;


Output:


Capture.PNG

ajaykumar1
Creator III
Creator III
Author

Thanks Sun and Swehel

Its working.

sunny_talwar

Glad we were able to help.

Best,

Sunny