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: 
EvanBarrick
Creator
Creator

Set Analysis, Multiple Expressions

I have three fields that I want to incorporate into a set analysis expression; PRICE_SCALE_CODE, PRICE and QTY

I want to get the QTY when the PRICE_SCALE_CODE = 'SUITE' and the PRICE > '0' and then subtract the QTY when the PRICE_SCLAE_CODE = 'SUITE' and the PRICE < '0'.

 

What would the structure of the expression be? I have the basis of the expression, Sum ({< PRICE_SCALE_CODE = {'SUITE'}>}QTY) working, but I am having difficulty expanding on this.

1 Solution

Accepted Solutions
PV
Contributor II
Contributor II

Basic expression
=sum({<CODE={'SUITE'},Price={">0"}>}Quantity)-sum({<CODE={'SUITE'},Price={"<0"}>}Quantity).

Please explain in detail if you have any specific requirements.

View solution in original post

1 Reply
PV
Contributor II
Contributor II

Basic expression
=sum({<CODE={'SUITE'},Price={">0"}>}Quantity)-sum({<CODE={'SUITE'},Price={"<0"}>}Quantity).

Please explain in detail if you have any specific requirements.