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

Set analysis condition evaluation and its behavior.

Hi All,

I need your assistance to understand Set analysis behavior when there is nothing in the field on the selection of another field. Can you please open the attached dummy application. It explains the problem in detail.

Thank you

2 Replies
sunny_talwar

Because you don't have a flag for Flower, it is causing this issue.... If you can fix this in the script, the problem should be resolved

Left Keep(Test)

LOAD * INLINE [

Product,IsVitamin

Flower,N

Meat,N

Yugurt,Y

];

swuehl
MVP
MVP

I think what you experience is due the way Qlik handles the associations between tables and how the inference engine works using state vectors. Not saying that it's not a problem, it's definitely returning unexpected results.

If you don't know which values are missing and you don't want to create fake values, try

Left Keep(Test)

LOAD Product, if(IsVitamin='Y',Dual('Y',1),Dual('N',0)) as IsVitamin INLINE [

Product,IsVitamin

Meat,N

Yugurt,Y

];

Then:

=sum({<IsVitamin={'Y'}>}Qty *IsVitamin )

or just

=sum(Qty *IsVitamin )