Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If function searching for case sensitive text

Hello,

I have a set of data that I need to qualify based on the text of a field and it is case sensitive.  The current load script is pulling ANYTHING that starts with clinical and I need it to recognize CLINICAL all in caps only.

Load

Metric,

Type,

Title,

Date,

If(Title LIKE 'CLINICAL*' and Metric = 'Letters', 'Include', 'Exclude') as Status

From

(ooxml, embedded labels, table is Sheet1);


How can I get it to be case sensitive?  Any help is greatly appreciated.

1 Solution

Accepted Solutions
sunny_talwar

How about this:

LOAD Metric,

    Type,

    Title,

    Date,

    If(Match(Left(Title, 8), 'CLINICAL') and Metric = 'Letters', 'Include', 'Exclude') as Status

From

(ooxml, embedded labels, table is Sheet1);

View solution in original post

6 Replies
sunny_talwar

How about this:

LOAD Metric,

    Type,

    Title,

    Date,

    If(Match(Left(Title, 8), 'CLINICAL') and Metric = 'Letters', 'Include', 'Exclude') as Status

From

(ooxml, embedded labels, table is Sheet1);

vishsaggi
Champion III
Champion III

Did not try may be like this?

IF(WildMatch(Title, 'CLINICAL*') AND Metric = 'Letters','Exclude','Include') AS Status

Not applicable
Author

Thank you for the information.  Wildmatch still brings both caps and lower case.

Not applicable
Author

This worked perfectly, as Match is case sensitive.  Now I know how to use it in an IF statement.  Thank you so much!

sunny_talwar

Ya I think WildMatch and MixMatch are both Case Insensitive. I did not know about Like, but it seems it is. But Match is case sensitive and so is a simple =...

If(Left(Title, 😎 = 'CLINICAL' ....

MarcoWedel

Hi,

another solution could be:

QlikCommunity_Thread_226257_Pic1.JPG

table1:

LOAD RecNo() as ID,

    Metric,

    Title,

    If(Index(Title,'CLINICAL')=1 and Metric = 'Letters', 'Include', 'Exclude') as Status

INLINE [

    Metric, Title

    Letters, CLINICAL

    no Letters, CLINICAL

    Letters, CLINICAL1

    no Letters, CLINICAL1

    Letters, Clinical

    no Letters, Clinical

    Letters, Clinical2

    no Letters, Clinical2

    Letters, None CLINICAL

    no Letters, None CLINICAL

    Letters, something else

    no Letters, something else

];

hope this helps

regards

Marco