Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem writing set expression (exclusion)

The idea behind the expression is:

I want to count all the products where the weight is 0 and the adjusted_weight does NOT equal 0,1.

This is the expression that i had (doesn't give the wanted result):

count({<,emptyings_weight={0}, emptyings_adjusted_weight-={'0,1'}>}product_id)

Can anyone see what is wrong?

Kind regards,

Katleen

12 Replies
sujeetsingh
Master III
Master III

Try this

count({$<emptyings_weight={0}, emptyings_adjusted_weight-={'0,1'}>}product_id)

Gysbert_Wassenaar

Remove the first comma. count({<emptyings_weight={0}, emptyings_adjusted_weight-={'0,1'}>}product_id) should work if your field names are the correct case-sensitive names.


talk is cheap, supply exceeds demand
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Remove the first comma in set analysis.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

All the suggested solutions don't give me the desired result.

I need the weight to be 0 AND the adjusted weight to NOT be 0.1.

Otherwise it should not count.

Any other ideas?

Gysbert_Wassenaar

Sure, post the offending document so we can have a look with all the context available.


talk is cheap, supply exceeds demand
jerrysvensson
Partner - Specialist II
Partner - Specialist II

count({<product_id = E({<emptyings_adjusted_weight = {'0,1'}>} product_id), emptyings_weight={0}>} product_id)

Not applicable
Author

In attachment an example qvw file

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Did you try my suggestion? It should work fine.

Not applicable
Author

Your suggestion is used in the example file, doesn't work unfortunalty.

Perhaps you can take a look at the qvw document to see why it doesn't work?

Kind regards,

Katleen