Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
NewToQlikSens
Partner - Contributor II
Partner - Contributor II

Filter table based on a condition for measure

Hi,

I have a field call unit_cost which is a SUM measure. Is there a way to filter this table to show records for whose values are less than/greater than 100.  If less than 100, only row 1 and 5 should be shown and vice versa.

I have tried set analysis, but not really getting the answer I'm looking for, as it is just subtracting from the existing values i think.

I have tried like this -> SUM({$<[unit_cost_]={"<=100"}>}[unit_cost])

 

NewToQlikSens_0-1710158867230.png

Any help would be appreciated.

Thanks

Labels (4)
1 Solution

Accepted Solutions
MatheusC
Specialist II
Specialist II

@NewToQlikSens 
see it like this:

sum({<product_type_en= {"=sum(unit_cost)<=100"}>} unit_cost)

 Regarts,
Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!

View solution in original post

3 Replies
MatheusC
Specialist II
Specialist II

@NewToQlikSens 
see it like this:

sum({<product_type_en= {"=sum(unit_cost)<=100"}>} unit_cost)

 Regarts,
Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
NewToQlikSens
Partner - Contributor II
Partner - Contributor II
Author

Thank you for the reply. Yes it is working.

But I'm not getting why we need to use product_type_en in the query, is it not possible only with unit cost?

MatheusC
Specialist II
Specialist II

Good, 👍

Because in this case we are filtering within the expression only the product_type_en that follow the calculation condition, that is, those whose sum(unit_cost) is <=100

Regarts, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!