Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

"not" function

Hi all,

I'm trying to solve a question and I don't even know if it is possible to solve.

Example:

Table with Person and attribute

Person1 attribute A, B

Person2 attribute A,B,C

Person3 attribute B,C

Person4 attribute A,C

Person5 attribute A

I would like to have a sort of "not" function: when I decide "I want to remove alle the people with A attribute", remove all the people with A even if they have also another attribute.

I did a try with the And/Not function but when I use the not (colouring in red the A attribute) function only the person 5 is removed from the selection.

Any idea?

Thanks in advance

Diego

10 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

I have one (an idea): use a calculated dimension.

Best,

Peter

Not applicable
Author

Not that easy... Sorry, I didn't say that it's just an example. I have hundreds of these situations and every "not" will effect on several sheets/graphs/tables.

vishsaggi
Champion III
Champion III

Hello Diego,

Can you send me the table structure of how your data looks and also you said you tried using AND/Not function with some coloring in red, where exactly you are using this.

Just wondering is this how your table should look like?? Below:

LOAD * Inline [

Person, Attribute

Person1, A

Person1, B

Person2, A

Person2, B

Person2, C

Person3, B

Person3, C........etc.

];

Peter_Cammaert
Partner - Champion III
Partner - Champion III

If it's a permanent exclusion, and you're not very eager to implement a solution 100 times, then why not throw out the data in your script?

Not applicable
Author

The structure is pretty complicate. there are about 170 tables. What I'm using is (I'm still trying to stay simple):

Table "people"

-Name, Last Name, Gender a ,lot of other fields, reference to attribute table.

Table attribute

-Number (reference), description, reference to a sub-attribute

Table sub-attribute

-reference, description

I need to exclude a sub-attribute and this way exclude all the people if they have at least this attr (even if they have other sub attribute).

Tables are correctly linked, selections works fine.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

An example that works. However, I wouldn't like to do this +100 times either... Is there a possibility to store the caluclated dimension in variables, and use a loop in your scirpt to calculate the expression for each different table?

Not applicable
Author

Because the user need to have the possibility to decide when exclude and when not

Not applicable
Author

Hi Diego,

You have the ability to insert a Set Analysis in the dimensions of the graph or tables that must follow this policy?
If you could, use the following set analaysis:

{$ <Attribute -= {'*A*'}>}

or
{$ <Attribute = {'*'} - {'*A*'}>}


This set analysis excludes any dimension that is connected to a attibute that contains A,

based on your example of data attributes in a single field.


Regards

Gennaro

Not applicable
Author

Can't do this way, A attribute was just an example. I have tons of attribute, different tables, and I need to let final user to select or not every attribute...