Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Partner
Partner

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

Tags (2)
9 Replies
Not applicable

Re: Set Analyses Exclude Selection

Can you please try below:


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

MVP & Luminary
MVP & Luminary

Re: Set Analyses Exclude Selection

Hi,


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


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


Regards,

Jagan.

Partner
Partner

Re: Set Analyses Exclude Selection

Hi

Thanks guys, tried it, but not working yet:

Image2.png

Highlighted

Re: Set Analyses Exclude Selection

Hi,

You can try this,

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


Regards,


Great dreamer's dreams never fulfilled, they are always transcended.
sushil353
Honored Contributor II

Re: Set Analyses Exclude Selection

Hi,

Try this:

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


HTH

Sushil

Not applicable

Re: Re: Set Analyses Exclude Selection

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

MVP
MVP

Re: Set Analyses Exclude Selection

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

Partner
Partner

Re: Set Analyses Exclude Selection

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
Valued Contributor

Re: Set Analyses Exclude Selection

Hi,

Please use

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