5 Replies Latest reply on Jul 20, 2018 6:36 AM by Albert Alaluf

    Select Filter

    Albert Alaluf

      Hello all,


      I have the challenge to make this filter. Maybe it is very simple or I'm missing some. Please see the sample data below.





      I have different event groups that values are correlated. For example for event#1, I have 3 lines, event#2 2 lines, and event#3 4 lines of data. Every event and its values are correlated. What I'm trying to do is, to select for each event only 2 values are equal to 1.

      For example;

      for event#1 value1 and value2 are 1, this is true

      for event#2 value1 is 1 but not value2, this is false

      for event#3 value value1 and value2 are 0, this is false, looking for 1s.


      In parallel to this, I also looking for,

      for event#3 value1 and value3 are 2, this is true.


      I believe you understood the logic. I'm looking for the couples in this example. For the selected event, I want to choose when the other 2,3,.... columns have the same value. For the same example, event#2 value1 is 1, but value2 is 2, this is false.


      I was not able to do this with a  filter or by calculation.


      Any suggestions are appreciated.



        • 1. Re: Select Filter
          Rob van Waveren

          Not sure I understand what you mean, but couldn't you just use the same data source multiple times and use combinations of joins to get what you want?

          • 2. Re: Select Filter
            Albert Alaluf

            Hi Rob,


            Thank you for the reply. Let me try to make simple this.


            There are 3 events here. For the event #1; if the value#1 is 1 (1st row) and the value#2 is 1 (2nd row), I want to filter and display only with these. If I put a filter in general in Tableau, it will display every item if value#1 is 1 and value#2 is 1. This is not what I want. For example for the event#3, the value#2 and the value#3 are 2 and I want to display this. The challenge is, the value#2 and the value#3 have the same but in different lines. If they were on the same row, AND query will work. But because of they are on the different rows AND query will return as false.


            So, multiple joins are not an option for this dataset.  The table will be larger than 2GB and with millions of records.



            • 3. Re: Select Filter
              Rob van Waveren

              Hi Albert,

              Not sure it works for such a huge database, but based on your example file the below DOES return the result you are looking for:

              I don't see a way to add the .tflx file I created for the above, but when you send me your email in a private message I can send it to you...

              1 of 1 people found this helpful
              • 4. Re: Select Filter
                Albert Alaluf

                Hello Rob,


                Please reply to albert.alaluf@verizonwireless.com



                • 5. Re: Select Filter
                  Albert Alaluf

                  I appreciate your answer. I got your mail, and it worked for this sample file. Considering my data, it was needed to clean, and also more actions like you did.


                  Our developer chose to go with Python.