Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

JustinDallas
Valued Contributor

Exclude from chart where value is in selection

TL;DR When I select in a filter list "Green" I want my chart to show every row where the color is NOT Green.  Right now my set analysis looks like this, but it's not blocking the actions of the FilterList.


if(

    substringcount(GetFieldSelections(my_color,'|'),my_color) = 0

    ,my_color

    ,Null()

)


Hello Everyone,

So the gist of my problem is that I have a chart that has a field called BillTo in it  I also have a ListBox/FilterList where the user can select the BillTo.

What I want to happen is that when the user selects a certain BillTo, the chart shows BillTos that DO NOT match the selection.  The problem is that I have to tell the chart to the filtering taking place on a certain parameter but to also show the set analysis.

Any help is greatly appreciated.

1 Solution

Accepted Solutions
JustinDallas
Valued Contributor

Re: Exclude from chart where value is in selection

I think this solution will work just fine.

QlikSenseExcluded.png

6 Replies
carlosamonroy
Contributor III

Re: Exclude from chart where value is in selection

Hi Justin,

To do the inverse of the current selection, you can use the following set analysis:

Example:

Sum({1-$}Sales)

Hope that helps,

Carlos M

JustinDallas
Valued Contributor

Re: Exclude from chart where value is in selection

But what if I don't want an aggregate function?

carlosamonroy
Contributor III

Re: Exclude from chart where value is in selection

What are the expressions in the chart?

Highlighted
JustinDallas
Valued Contributor

Re: Exclude from chart where value is in selection

There aren't any real expressions.  In the Table.  As of now, they are raw fields except for my previous attempt to exclude where instead of having the field name, I have this

if(   substringcount(GetFieldSelections(my_color,'|'),my_color) = 0 

,my_color 

,Null()

carlosamonroy
Contributor III

Re: Exclude from chart where value is in selection

Why don't you try:

only({1-$}my_color)

JustinDallas
Valued Contributor

Re: Exclude from chart where value is in selection

I think this solution will work just fine.

QlikSenseExcluded.png

Community Browser