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

Set Analysis with Multiple Conditions

I am trying to count the distinct item ids that the quantity is greater than 0 and have a margin greater Than $150.

Issue is that it ignores the quantity of greater than 0. When I get my results I see that it is includes negative Quantities. When answers should show Margin that is greater than 150 and quantities that are greater than 0.

The formula is

,Count({<ITEM_ID={"=Sum(QUANTITY) > 0"},ITEM_ID={"=SUM(CTF)/SUM(QUANTITY)>150"}



>}
distinct ITEM_ID)

Any advice would be greatly appreciated been spending days trying to figure it out. I even created in the script a column that identifies

positive and negative Flag and tried to that into the expression with no success

Thanks

3 Replies
sunny_talwar

May be try this

Count({<ITEM_ID = {"=Sum(QUANTITY) > 0 and SUM(CTF)/SUM(QUANTITY)>150"}>} DISTINCT ITEM_ID)

Anonymous
Not applicable
Author

Thank you so much, I know is was getting close. I was making it more complicated than needed.

sunny_talwar