Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vardhancse
Valued Contributor II

Exclude records contain certain text

Hi,

Here is the sample data have loaded:

1. out of the given records need to take only that contain India(Used where condition)

2. Out of records contain India need to exclude records that contain Maharashtra(can please let me know the condition need to include)

Pls find the attached sample app for reference

Test:

LOAD * INLINE [

    Area, Amount, Unit

    Global/US/USA/LA/abc, 1, USD

    Global/US/USA/CA/abc, 1, USD

    Global/UK/London/LA/abc, 1, GBP

    Global/Asia/India/Karnataka/Bangalore, 20, INR

    Global/Asia/India/Maharashtra/Mumbai, 30, INR

    Global/Asia/India/Karnataka/Bangalore, 40, INR

    Global/Asia/India/Maharashtra/Mumbai, 50, INR

    Global/Asia/India/Karnataka/Bangalore, 60, INR

    Global/Asia/India/Maharashtra/Mumbai, 70, INR

    Global/Asia/India/Karnataka/Bangalore, 80, INR

    Global/Asia/India/Karnataka/Bangalore, 90, INR

    Global/Asia/India/Maharashtra/Mumbai, 10, INR

    Global/Asia/India/Karnataka/Bangalore, 20, INR

   

];

Main:

Load *,

Unit as Measure

Resident Test where wildmatch(Area,'*India*');

Drop Table Test;

1 Solution

Accepted Solutions

Re: Exclude records contain certain text

Hi Sasi,

Main:

Load *,

Unit as Measure

Resident Test where wildmatch(Area,'*India*') and Not WildMatch(Area, '*Maharashtra*');

4 Replies

Re: Exclude records contain certain text

Hi Sasi,

Main:

Load *,

Unit as Measure

Resident Test where wildmatch(Area,'*India*') and Not WildMatch(Area, '*Maharashtra*');

laddu_927
Valued Contributor

Re: Exclude records contain certain text

Test:

LOAD * INLINE [

    Area, Amount, Unit

    Global/US/USA/LA/abc, 1, USD

    Global/US/USA/CA/abc, 1, USD

    Global/UK/London/LA/abc, 1, GBP

    Global/Asia/India/Karnataka/Bangalore, 20, INR

    Global/Asia/India/Maharashtra/Mumbai, 30, INR

    Global/Asia/India/Karnataka/Bangalore, 40, INR

    Global/Asia/India/Maharashtra/Mumbai, 50, INR

    Global/Asia/India/Karnataka/Bangalore, 60, INR

    Global/Asia/India/Maharashtra/Mumbai, 70, INR

    Global/Asia/India/Karnataka/Bangalore, 80, INR

    Global/Asia/India/Karnataka/Bangalore, 90, INR

    Global/Asia/India/Maharashtra/Mumbai, 10, INR

    Global/Asia/India/Karnataka/Bangalore, 20, INR

   

];

Main:

Load *,

Unit as Measure

Resident Test where wildmatch(Area,'*India*') and 1-sign(WildMatch(Area,'*Maharashtra*'));

Drop Table Test;

Re: Exclude records contain certain text

Check now

vardhancse
Valued Contributor II

Re: Exclude records contain certain text

Hi All,

thank you so much for your quick repliesSmiley Happy

Forgot the not wildmatch()