Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ziabobaz
Contributor II

Setting global filter (in scipt) which affects whole app

Hello,

Is there way to set certain filter in script, rather than ammending each formula in the app with set analysis?

I have loaded data for 2 organizations into the app.

Company:

Beta

Gamma

I want to SUM (< {Company={'Beta'} }> Sales), but i want to write something in the scipt which will effect the whole application and make possible using SUM (Sales) to return sales for Beta company (w/o set analysis).

I don't want to check all pages of my monster script for the places where I could have used Company field.

Is it possible with one line in the end of the script?

Cheers!

Tags (2)
1 Solution

Accepted Solutions
pawwy1415
Contributor II

Re: Setting global filter (in scipt) which affects whole app

Hi

try with

where match(company)='Beta';

3 Replies
pawwy1415
Contributor II

Re: Setting global filter (in scipt) which affects whole app

Hi

try with

where match(company)='Beta';

pawwy1415
Contributor II

Re: Setting global filter (in scipt) which affects whole app

Hi

Small syntax change

method1:

where company='Beta';


mehod2:

where match(company,'Beta');

rittermd
Honored Contributor

Re: Setting global filter (in scipt) which affects whole app

Keep in mind that your dashboard will now only contain the records where Company = 'Beta'

If you want to see any other companies they will not be in your load.  That is why we use Set Analysis so that we can load more data but only see what we want to see in a visualization.