Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

best way to filter when loading a table

Hi,

What is the best way to filter out something when loading a table? I have a table that has all different locations for a manufacturer but I would like to load only data for specific ones.

Example: I have different locations but I only want to bring in data for the locations that start with L1, (i.e L1_Missouri, L1_Florida, L1_Iowa)

Location

L1_Missouri

L2_Missouri

L1_Florida

L2_Florida

L1_Iowa

L2_Iowa

3 Replies
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

you can do it with wildcard searches using wildmatch or Like functions. You also have the static searches (where Location = L1_Florida.

You can also use variables that can be modified through an external file/inline table and be used as parameters for the where clause via UI input box or input during script execution,

check the attached example

regards

tobias_klett
Partner - Creator II
Partner - Creator II

Hi,
just use
where left(Location,2) = 'L1';

Hope this helps

its_anandrjs
Champion III
Champion III

From any field perspective you are asking then you can filter the records from the script load 

Ex:- From Load script

Load

Location

from Source

Where

Left(Location,2) = 'L1';

Ex:- From the Front end by the flag field

LOAD Location,if( Left(Location,2)='L1',1,0) as Flag;

LOAD * Inline

[

Location

L1_Missouri

L2_Missouri

L1_Florida

L2_Florida

L1_Iowa

L2_Iowa

];

And on UI side write calculated dimension

If(Flag=1,Location) //And Suppress when value is null.