Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

Select intersection in filter pane.

Hello everyone.

 

I have one filter pane with qualities for a set of people  for year 2017.

I want to select in the filter pane two of those qualities simultaneously (intersection)  for these people this year. What I'm getting is the union. How do I do this ?

 

Thank you in advance.

 

Ioanna

 

Labels (3)
10 Replies
Anil_Babu_Samineni

Perhaps this?

Exp(Sum({<Person = P(Person)>} Log(Sales)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ioannagr
Creator III
Creator III
Author

Let's say in these qualities I have the traits:

happy

excited

sad

 

I want to select people in the filter pane who are both happy and excited. If i click on happy and excited I get all the people who are either happy or excited.

This is what I'm looking for, maybe I was not clear.

Any ideas?

 

Thank you for the input Anil. 

agigliotti
Partner - Champion
Partner - Champion

maybe something as below for a calculated dimension in a filter?

aggr( if( qualities = happy and qualities = excited, 'happy&excited' ), person )

ioannagr
Creator III
Creator III
Author

Hello and thank you.

 

Thought about that, but the thing is I have then 125 combinations to present like that. So I hoped there's another, quicker way for me to do this. 

 

 

 

 

Anil_Babu_Samineni

Perhaps this?

Sum({<Person = {"$(=Chr(39) & Concat(Distinct Person, ',') & Chr(39))"}>} Sales)
Or
Sum({<Person={"$(=SubField(Chr(39) & Concat(Distinct Person, ',') & Chr(39),',',1))"}>+<Person={"$(=SubField(Chr(39) & Concat(Distinct Person, ',') & Chr(39),',',2))"}>+<Person={"$(=SubField(Chr(39) & Concat(Distinct Person, ',') & Chr(39),',',3))"}>} Sales)

Or, I would recommend give self Adhoc to customers (It will allow based on selection)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
gmenoutis
Partner - Creator II
Partner - Creator II

Let's begin with the fact: There is no way to do this in a single action using the qlik engine filter functionality as it is.

So you have to consider alternatives. Each have pros and cons, select depending on what you want.

  • You can select one value, use "select possible" on a key field for person (person ID?), and then select the other value. Now you have selected all with both values. This is maybe slow and complicated as GUI usage, but it works already in your app and it needs no changes.
  • You can use a dimension that holds value pairs, as another answer already shows. You can do this in a calculated dimension, as per that answer, or through the script. The advantage of the script would be that you could select only specific pairs to appear.
ioannagr
Creator III
Creator III
Author

Hello @gmenoutis ,

i'm coming back to this thread. Quoting your answer 

  • "You can select one value, use "select possible" on a key field for person (person ID?), and then select the other value. Now you have selected all with both values. This is maybe slow and complicated as GUI usage, but it works already in your app and it needs no changes."

What If i wanted to select those IDs with simultaneously three values in this filter? How could this work?

gmenoutis
Partner - Creator II
Partner - Creator II

Ahh, the famous "Re-select Possible" problem. I remember I had found it in some third party extension, but I found another way to do it. So:

1) Filter "Happy"

2) Go to the persons key, let's say "Person ID", and "Select Possible". Clear "Happy". Now you have all happy persons' ids selected.

3) Select "Excited".  In order to "lock" this selection, go to "Person ID" and do "Select alternative" *twice*. This will have an effect of "re-selecting possible". Clear "Excited". Now you have all happy and excited persons' ids selected.

4) Repeat step 3 with "Sad" or actually any other selection. You can keep doing this indefinitely. In the end, you will have a set of persons which satisfy all of your conditions. 

ioannagr
Creator III
Creator III
Author

haha @gmenoutis , really, the infamous intersection problem... Just like you said it!

I will try it and let you know how it went. Really complex for someone who is just a plain ui user , but, what to do 😕