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

Dynamically applied filter in load script

How can we load data in qlikview with dynamically required filters applied.

i.e I have Sales data corresponding to different regions in SQL DB.

I want to develop a qlikview report which should load data for a random region that I specify dynamically.

The load query should hit the DB with filter as dynamically given region

11 Replies
MayilVahanan

Hi

Try like this

Let vName = Input('Enter region', 'Input box');

Let vName = Chr(39) & Replace('$(vName)', ',', Chr(39)&','&Chr(39)) & Chr(39);

CustomerInfo:

Load * from yourtable Where MixMatch([Customer A/c Name], $(vName));

User need to enter like smith,jones etc.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

Create a variable vUserSelect in your UI

=Only(RegionField) // or concat field values

Then, in your script & on reload, test if the variable shows a value and filter your table

Let vWhere = If(Isnull(vUserSelect),'1=1', 'Region = ' & chr(39) & vUserSelect & chr(39));

LOAD

...

FROM ...

WHERE $(vWhere);