Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
CT77
Contributor II
Contributor II

AND with Set Analysis

Hello,

I have the following table:

CT77_0-1622048606981.png

Now I want filter the data:

I need all IDs where Product = A  and Measerument = 5 and also Product = D and Measurement = 3.
In this case the result is 20.

How can I calculate the formula with set analysis, maybe with the P - function?

Thank you in advanced.

Labels (1)
1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Change it from a Union to an Intersection

{<ID=P({<Product={'A'},Measurement={'5'}>}ID)*P({<Product={'D'},Measurement={'3'}>}ID)>}

View solution in original post

4 Replies
jwjackso
Specialist III
Specialist III

{<ID=P({<Product={'A'},Measurement={'5'}>}ID)+P({<Product={'D'},Measurement={'3'}>}ID)>}

CT77
Contributor II
Contributor II
Author

Thank you for your quick answer. Now I think the example wasn´t good enough to explain the problem.

Therefore I have added another row, with product A.

CT77_0-1622050703693.png

I think your solution give me also the ID 5 (last row). But I need only the IDs where equal for both products.

jwjackso
Specialist III
Specialist III

Change it from a Union to an Intersection

{<ID=P({<Product={'A'},Measurement={'5'}>}ID)*P({<Product={'D'},Measurement={'3'}>}ID)>}

CT77
Contributor II
Contributor II
Author

Perfect, Thank you. I´ve never seen this union bevor.