Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Confusion

Hi All,

One day I will get the hang of this, can anybody point out anything blatently missing from the following statement

=Sum({$<units={">=0"}>}costprice)

I am attempting to sum cost price where units are greater than zero. (Units are units sold) cost price is complete even for records where there are no sales.

When attempting the formula I am getting 0 this is despite having a straight table (for reference whilst I develop) on the screen that clearly shows products with units = 0 but with cost price populated.

Any thoughts/help will be appreciated

Cheers,


Andrew

2 Replies
simondachstr
Luminary Alumni
Luminary Alumni

You're very close:

=Sum({$<units={'>=0'}>} costprice)

should do it if your fieldnames are correct (Remember they're case sensitive).

If you use {'>=0'} with " it will interpret it as a string and will look for entries in units which correspond to ">=0".

stigchel
Partner - Master
Partner - Master

If you don't want to include 0 you should leave out the = in the comparison, >= means greater then or equal to

=Sum({$<units={'>0'}>} costprice)