Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
ABC | GA | 40 | 110 |
ABC | FL | 40 | 210 |
ABC | TX | 20 | 310 |
when its any other dress then selections should be considered
for Dress PQR and location CA only One row should be displayed
PQR | CA | 40 | 410 |
without any selections all data is below.
DRESS | LOCATION | SIZE | QUANTITY |
ABC | GA | 40 | 110 |
ABC | FL | 40 | 210 |
ABC | TX | 20 | 310 |
PQR | CA | 40 | 410 |
PQR | OH | 20 | 200 |
XYZ | KY | 40 | 300 |
XYZ | NY | 20 | 400 |
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.
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.
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
@rwunderlich And I, in turn, completely forgot we could use the $ explicitly here. Good catch!
This worked like a charm.👍
Thank you!