Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsult
Partner - Creator
Partner - Creator

Set Analyses Exclude Selection

Hi

I've got a Chart Type Straight table with the expression:

sum({<Source={'SALES'}>} NrOfCartons)

Then I have a list box with the field [Consignee].

How would I write the expression to exclude the the selection(s) made in the [Consignee] field?

Will really appreciate it if someone can give me a hand

Image.png

9 Replies
Not applicable

Can you please try below:


sum({<Source={'SALES'},Consignee=>} NrOfCartons)

jagan
Luminary Alumni
Luminary Alumni

Hi,


Use Consignee= in set analysis expression, it ignores the selection in the field.


=sum({<Source={'SALES'},Consignee=>} NrOfCartons)


Regards,

Jagan.

qlikconsult
Partner - Creator
Partner - Creator
Author

Hi

Thanks guys, tried it, but not working yet:

Image2.png

PrashantSangle

Hi,

You can try this,

=sum({<Source={'SALES'},Consignee=e(Consignee)>} NrOfCartons)


Regards,


Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sushil353
Master II
Master II

Hi,

Try this:

=sum({1-$<Consignee,Source={'SALES'}>} NrOfCartons)


HTH

Sushil

Not applicable

Try as attached:

1) You have to keep the Consignee= in the set anlaysis of expression.

2)  Then you need to edit the dimension of Consignee in the pivot/straight table to use below expression

     =if(not Match(Consignee,$(vConsignee)),Consignee)

     check the Suppress the NULL value checkbox.

3) Create a variable named : vConsignee as below

     =replace(chr(39) & GetFieldSelections(Consignee)& chr(39),', ',(chr(39)&', '&chr(39)))

Hope this was helpful.

Thanks,

Angad

MK_QSL
MVP
MVP

IF(NOT IsNull(GetFieldSelections(Consignee)),SUM({<Source={'SALES'},Consignee= E(Consignee)>}NrOfCartons),SUM({<Source={'SALES'}>}NrOfCartons))

semperaugustus
Partner - Contributor II
Partner - Contributor II

I think this is the right way.

There is also another solution:

1) add a new Alternate State and call it "Consignee".

2) apply this alternate state only to the list box

3) insert in the chart the expression: sum({$-[Consignee]<Source={'SALES'}>} NrOfCartoons)

ashwanin
Specialist
Specialist

Hi,

Please use

sum({1<Source={'SALES'}>} NrOfCartons)