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: 
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!