Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mukesh19
Not applicable

Intersection

Hi all,

I have a problem that is I have two filter panes with the same dimensions, If I select a value in the first filter pane and another value in the other filter pane, I want the result to be as the intersection of both the values selected rather than the union.

regards,

sai.

8 Replies
sureshqv
Not applicable

Re: Intersection

try this

Aggr(Count( {$<Field= {'Value1', 'Value2'}>} Dim1), Dim2)

or

=count (distinct  {<code = P ({<exam={"1"}>} code ) >*<code = P ({<exam={"2"}>} code ) > } code )

mukesh19
Not applicable

Re: Intersection

can u please elaborate the syntax what u have written thats not working

agigliotti
Not applicable

Re: Intersection

maybe this:

Suppose you have two fields (DimField1, DimField2) in your data model related to the same database field (DimField).

ex.

{< DimField = P(DimField1) * P(DimField2) >}

mukesh19
Not applicable

Re: Intersection

both the fields are same in two filter panes after selections in both the filter panes I want intersection rather than union.

agigliotti
Not applicable

Re: Intersection

you can't achieve it using only one field, you need to create two extra fields in your script as I wrote before.

mukesh19
Not applicable

Re: Intersection

hi chanty,

What you wrote is fine but, Instead of count I need the code values . How can I achieve it.

Thanks in Advance,

Sai

agigliotti
Not applicable

Re: Intersection

maybe this:

Concat( {< DimField = P(DimField1) * P(DimField2) >} code, ';' )

mukesh19
Not applicable

Re: Intersection

Its not Working