Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Alex9
Partner
Partner

Set analysis with intersection of possible values sets - Issue about dimension equality

Hello,

As mentioned in the title, I'm asking for your help about some issues in a set analysis with intersection of possible values sets.

Here are my input data:

MissionDateOriginDestination
M101/02/2021AB
M101/02/2021BC
M101/02/2021CD
M101/02/2021DE
M201/02/2021BC
M201/02/2021CD
M201/02/2021DE
M301/02/2021AB
M301/02/2021BC
M306/02/2021CD
M306/02/2021DE
M306/02/2021EF

 

And I would like to determine in a set analysis the Missions by Date which have passed through C and E Destination (at the same Date) in order to get this:

DateMission
01/02/2021M1
01/02/2021M2

 

I tried to use the following set analysis in the Mission expression:

{<Mission=P({<Destination={"C"}>} Mission)*P({<Destination={"E"}>} Mission)>}

But I got that:

DateMission
01/02/2021M1
01/02/2021M2
01/02/2021M3
06/02/2021M3

 

M3 passed through C and E destination but not the same date that's why I want to exclude it.

It seems that the dimension Date in the table is not taken into account in the set analysis Mission part.

Do you know if there is a way to make sure about the Date dimension equality in the two possible values sets ?

 

Thanks in advance for you help,

Alex.

 

Labels (2)
1 Solution

Accepted Solutions
agigliotti
Partner
Partner

Hi @Alex9 ,

You could use the below expression for your measure:

=sum( if( count( {< Destination = {'C','E'} >} >} distinct Destination ) = 2, 1, 0 ) )

with Mission and Date as dimensions plus enabling "Suppress Zero-Values" option under "Presentation".

I hope it can help.

Best Regards

View solution in original post

2 Replies
agigliotti
Partner
Partner

Hi @Alex9 ,

You could use the below expression for your measure:

=sum( if( count( {< Destination = {'C','E'} >} >} distinct Destination ) = 2, 1, 0 ) )

with Mission and Date as dimensions plus enabling "Suppress Zero-Values" option under "Presentation".

I hope it can help.

Best Regards

View solution in original post

Alex9
Partner
Partner
Author

Hello @agigliotti,

It works perfectly !

Thank you ,

Alex