Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: If function searching for case sensitive text

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

Re: If function searching for case sensitive text

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

vishsaggi
Esteemed Contributor III

Re: If function searching for case sensitive text

Did not try may be like this?

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

Not applicable

Re: If function searching for case sensitive text

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

Not applicable

Re: If function searching for case sensitive text

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

Re: If function searching for case sensitive text

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' ....

Re: If function searching for case sensitive text

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