Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jdmarlin
Contributor III
Contributor III

Possible and Exclude in Set Analysis

  I have the following table:

ProductCategoryCost
AX0
AY10
BY-10
BZ10
CX0
CY-10

I'm trying to filter the results as:

Products that have

1) Category equal to X

2) Does not have Category equal to Y and Cost greater than 0

So only product C meets those requirements. Product C has Category X and does not have Category Y where cost is greater than 0.

So I've tried:

Sum({< Product=P({< Category={'X'} >}), Product=E({< Category={'Y'}, Cost={">0"} >}) >} Revenue)

Any help greatly appreciated!

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Sorry try this?

= Sum({< Product = P({< Category = {'X'}, Product = E({< Category = {'Y'}, Cost = {'>0'} >})>}) >} Revenue)

View solution in original post

4 Replies
vishsaggi
Champion III
Champion III

Try this?

= Sum({< Category = {'X'} , Product = E({< Category= {'Y'}, Cost = {'>0'} >}) >} Revenue)

vishsaggi
Champion III
Champion III

Sorry try this?

= Sum({< Product = P({< Category = {'X'}, Product = E({< Category = {'Y'}, Cost = {'>0'} >})>}) >} Revenue)

swuehl
MVP
MVP

Try

=Concat(

     {<Product=P({< Category={'X'} >})*E({< Category={'Y'}, Cost={">0"} >}) >}

DISTINCT Product,',')

jdmarlin
Contributor III
Contributor III
Author

It worked! Thanks!