Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sujith1011
Partner - Creator
Partner - Creator

Set Analysis, Conditional Ignore Selections

Experts please suggest if the below could be achieved , 

when Dress='ABC' then ignore selections for Location and Size and display all rows for that dress

so, if dress = ABC and location =GA ,it should still show  3 rows 

ABCGA40110
ABCFL40210
ABCTX20310

when its any other dress then selections should be considered

for Dress PQR and location CA only One row should be displayed

PQRCA40410

 

without any selections all data is below.

DRESSLOCATIONSIZEQUANTITY
ABCGA40110
ABCFL40210
ABCTX20310
PQRCA40410
PQROH20200
XYZKY40300
XYZNY20400
    
Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

I can't think of any good way to do it within a single set analysis, but doing it in two passes should work, I think:

Sum({< DRESS *= {"ABC"}, LOCATION = , SIZE = >} QUANTITY)
+ Sum({<DRESS-={"ABC"} >} QUANTITY)

Note that results may be somewhat "unexpected" if multiple DRESS values are selected which include ABC and other values at the same time.

View solution in original post

4 Replies
Or
MVP
MVP

I can't think of any good way to do it within a single set analysis, but doing it in two passes should work, I think:

Sum({< DRESS *= {"ABC"}, LOCATION = , SIZE = >} QUANTITY)
+ Sum({<DRESS-={"ABC"} >} QUANTITY)

Note that results may be somewhat "unexpected" if multiple DRESS values are selected which include ABC and other values at the same time.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Really nice solution @Or . Good use of the "*=" that I can never remember. I would use your concept but would write it differently.   Instead of adding the sums, I would union  the sets before summing.

Sum({$ + < DRESS *= {"ABC"}, LOCATION = , SIZE = >} QUANTITY)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

Or
MVP
MVP

@rwunderlich  And I, in turn, completely forgot we could use the $ explicitly here. Good catch!

sujith1011
Partner - Creator
Partner - Creator
Author

This worked like a charm.👍

Thank you!