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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
User12321
Contributor III
Contributor III

Count if row value difference is positive

Hi,

I have Table1 with fields Quantity1, Quantity2 and QuantityKey, Table 2 with field Conversion1 and Table3 with field Conversion2.

I want to count the number of different QuantityKey with the following condition:

Quantity1 x Conversion1 - Quantity2 x Conversion2 is positive 

Can someone help please. Thank you.

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

Hi 
try this one :

Sum(AGGR(if(Quantity1*Conversion1-Quantity2*Conversion2>0,1,0),QuantityKey))

View solution in original post

1 Reply
lironbaram
Partner - Master III
Partner - Master III

Hi 
try this one :

Sum(AGGR(if(Quantity1*Conversion1-Quantity2*Conversion2>0,1,0),QuantityKey))