Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for
Did you mean:
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
Champion III

Sorry try this?

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

4 Replies
Champion III

Try this?

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

Champion III

Sorry try this?

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

MVP

Try

=Concat(

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

DISTINCT Product,',')

Contributor III
Author

It worked! Thanks!

Community Browser