Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
mukesh19
Contributor II
Contributor II

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
Chanty4u
MVP
MVP

try this

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

or

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

mukesh19
Contributor II
Contributor II
Author

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

agigliotti
MVP
MVP

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) >}

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
mukesh19
Contributor II
Contributor II
Author

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

agigliotti
MVP
MVP

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

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
mukesh19
Contributor II
Contributor II
Author

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
MVP
MVP

maybe this:

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

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
mukesh19
Contributor II
Contributor II
Author

Its not Working