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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bc123456
Contributor
Contributor

Filter Negative Values before Aggregation

Hi - Below is a sample data set along with what I am getting vs. what I want. How can I filter the negative values out before the sum aggregation? The problem is Value is an expression. Let's say it's Value1-Value2= Value

bc123456_0-1673893413471.png

 

Thanks for your help!

 

Labels (4)
2 Replies
pedrobergo
Employee
Employee

Hi @bc123456 

You can use Set Analysis:

Sum({<Value={">0"}>}Value)

Or just using If

Sum( if(Value>0,Value,0))

[],

Pedro

MarcoWedel

another option might be:

Sum(RangeMax(Value,0))