Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

EvanBarrick
Contributor

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
Highlighted
PV
New Contributor II

Re: Set Analysis, Multiple Expressions

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

Please explain in detail if you have any specific requirements.

1 Reply
Highlighted
PV
New Contributor II

Re: Set Analysis, Multiple Expressions

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

Please explain in detail if you have any specific requirements.