5 Replies Latest reply on Jul 27, 2018 7:32 AM by Ankit Bansal

    Filtering Blend - Secondary Source to Primary Source

    Scott Carman

      Afternoon all!

       

      The current project is working with contract information and I am trying to connect the period of performance to the financial data.

       

      Table 1 has contract information with period of performance.

      Table 2 has contract financial information

      Table 3 has company hierarchy organizational information

       

      Each tables contain a lot of information.  There is not a distinct "one to many" relationship.  Performance wise I know that a join is better and faster.  I have tried a couple different configurations of joins and have not been able to come up with a good solution.

       

      I did a some research on this and found out that indeed a join is faster, but when running into large datasets, blends are better.

       

      So I tried a blend.  It's great!

       

      The issue is when I try to filter the data in the dashboard.  It seems that the filter only works on the source that it came from, not across data sources (primary to secondary and vice versa).  I thought about creating parameter but that leaves me without the ability to show relevant data only.

       

      I did a search before writing this post but it seems that most questions have gone unanswered or the responder recommends a join.

       

      I can't include a workbook as I have proprietary information and I am working in 10.5

       

      Any help would greatly be appreciated.

       

      Thank you,

       

      Scott

        • 1. Re: Filtering Blend - Secondary Source to Primary Source
          Ankit Bansal

          Scott,

           

          I am not sure if I get it right. What I know is Blending always does a left join ie primary data source left join with secondary data source.  for eg:

          primary source is

           

          id , name

          1,      A

          2,     B

           

          secondary is

          id , name1

          1,      C

          3,      D

           

          Now when you blend on ID field , data will look like this:

           

          id, name , name1

          1,     A     , C

          2,     B     ,NULL

           

          You will not see 3, D in output

           

          Now when you apply filter on name1(from secondary data source) on dashboard you will see "D" also in list of values but filleting out it will not make any impact on your view  because it was already filtered out as part of blending.

          Other than that i think everything else will behave right like when you filter out name 'A' your whole row will go , or filtering out name1 'C' again whole row will go.

           

          Not sure if I made sense to you. Hope it helps.

          • 2. Re: Filtering Blend - Secondary Source to Primary Source
            Scott Carman

            Ankit,

             

            That does make sense to me!  Thank you for your response.

             

            What doesn't make sense to me is when I apply the filter from the primary source, I cannot apply that filter to the sheets that have the secondary source as a primary measure.

             

            Your question made me realize that I am not asking my original question in the correct manner.

             

            Scott

            • 3. Re: Filtering Blend - Secondary Source to Primary Source
              Ankit Bansal

              Ahh! Now i got what you are trying to ask.

               

              I just created one more sheet ( sheet2 , previous one let say was sheet1) by reversing the primary and secondary source in my previous example and now when i put both sheets on a dashboard , filter on 1 sheet not affecting data of other sheet.

              But what is interesting is dashboard actions are working. So if you use 1 sheet as filter and you click on a data point , it will filter data for other sheet as well.

               

              To further investigate it I created one more sheet (sheet3) same as sheet1. Now when i went to a filter of sheet1 on Dashboard and chose selected worksheet option:

               

               

              the pop up comes as:

               

              so for sheet 2 it says relationship "None"(and checkbox is disabled). So i guess when the primary and secondary sources are swapped in two sheets , Tableau can not make any relationship between them. And so it does not filter data.

              That's all I could make out.

              • 4. Re: Filtering Blend - Secondary Source to Primary Source
                Scott Carman

                Ankit,

                 

                Of course you have to have a relationship.  Tableau does the best job it can to figure that out and to help but I know you have to have something in common.

                 

                That said - I asked a friend of mine the same question as I wrote this post.

                 

                He told me that you have to make sure that you use a related field between the primary and secondary sources, and you will be able to filter.

                 

                So for example:

                 

                Table 1 has the dimensions - ID, Animal, Color

                Table 2 has the dimensions - ID, Color, Name

                 

                Therefore if you set this up a relationship to color and ID, the blending will work.   You have to drag a common field into the viz and that is the field in which you will filter on.  In this case, it doesn't make sense to bring ID into the viz but it would make sense to bring Color in.

                 

                He showed me this picture:

                 

                Related Data Source Filteriing.jpg

                I did a quick search and found this article:

                http://https://www.tableau.com/about/blog/2016/5/requested-you-can-filter-across-data-sources-tableau-10-54330

                 

                Thanks,

                 

                Scott

                1 of 1 people found this helpful
                • 5. Re: Filtering Blend - Secondary Source to Primary Source
                  Ankit Bansal

                  Thanks Scott to make it clear