Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ElsKnockaert
Contributor III
Contributor III

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!

ElsKnockaert_1-1592378561074.png

ElsKnockaert_0-1592378016461.png

 

 

2 Replies
Vegar
MVP
MVP

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,'],[') & ']') 

ElsKnockaert
Contributor III
Contributor III
Author

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.

ElsKnockaert_0-1592382638968.png