Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Ignore selection on all tables except for one

Good morning

I'm new to Qlik and have come across an issue I can't seem to work out.

I have a variable vScopeCust that should result into, for example, the amount of customers that are selected by use of fields in the tables Customer or Customer Visit Times. If there is a selection on other tables, like order or visit, this number should remain unchanged.

definition :   $(='[' & Concat({<$Table =- {'Customer','Customer Visit Times'}>}$Field,'],[') & ']') 
usage:            Count({$<$(=vScopeCust)>} Cust_Internal_Id)

This seemed to work with other tables but not with the table ND_Period. Whenever a date is selected from this table vScopeCust seems to take it into account. So when I select a value of ND_Year_Month (field of table ND_Period), the expression Count({$<$(=vScopeCust)>} Cust_Internal_Id) returns a different number than before. It changes from 837 to 567. 

However when I try to collect all possible values containing to the customer table for these selections,  I do receive the right number, 837 clients. This is not a good solution though as there are a lot of fields in the table Customer and this variable is used a lot throughout the sheets.

Count({1<Cust_Territory=P(Cust_Territory), Cust_Chain=P(Cust_Chain), Cust_Active=P(Cust_Active)>} Cust_Internal_Id)

Now for my question: How can I make my variable vScopeCust work with the table ND_Period so that when a period from this table is selected, vScopeCust ignores it, just like the other tables?

Any help would be appreciated!





2 Replies

Could it be that you are having active selections in the $table or $field? Override these by using a full set in your variable. 

 $(='[' & Concat({ 1<$Table =- {'Customer','Customer Visit Times'}>}$Field,'],[') & ']') 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Contributor II
Contributor II

Thank you for your reply!
There are some active selections on fields, screenshot inclosed.
But with the alteration to include the full set, I still get 567 customers instead of 837.