5 Replies Latest reply on Apr 28, 2016 6:14 PM by Vijaya Kumar Reddy Chinnam

    Blending shows null in secondary data source filter

    Vijaya Kumar Reddy Chinnam



      I have two data sources a mentioned below.


      MSS_1.txt (Primary Data Source)




      Ca_1.txt (Secondary Data Source)




      I have created below relations in the sheet.

      1)MDY(m_date) to MDY(c_date)

      2) m_c to c_c

      3) m_tType to c_tType

      4) m_tg to c_tg


      Please see below image of my sheet. Want to under stand why c_c filter has null value?

      Screen Shot 2016-04-28 at 10.57.23 am.png


      Please find attached workbook.

        • 1. Re: Blending shows null in secondary data source filter


          It is because in data blending whatever the column you drag on to the sheet first it will work as a left table and the join will be left join so in that case all the rows from the primary data source and matching rows from the secondary data source.

          In your scenario as you used column from secondary data source as filter so the nulls are that those are not matching with the primary data source.

          As you are joining on most of the columns from both the data sources, you need to check all the records matching and getting expecting results based on your expectations.

          Please look into the below video on Data blending.



          • 2. Re: Blending shows null in secondary data source filter
            Tableau kumar

            Belnding works like "LEFT OUTER JOIN", Once you define the Blending , we can make "INNER JOIN".

            Let me explain by an Example here.



            CNT     Sales

            A          100

            B          121

            C          123



            CNT          Profits

            A               15

            C               13

            E               15

            F               25


            If we implement the Blending DB1 as Primary, DB2 as Secondary then we get the Following Result.


            CNT          Sales          Profits

            A               100               15

            B               121

            C               123               13


            Now we write a condition & then get the result as like EQUI (INNER) Join.


            create a calculated fields as below

            attr([CNT]) = attr([DB2].[CNT]))

            Then drag the above calculated field on to filters shelf then select "TRUE".


            Once we done the above two steps, we get the following O/P.


            CNT          Sales          Profits

            A               100               15

            C               123               13


            I hope this helps you.


            Best Regards


            • 3. Re: Blending shows null in secondary data source filter
              Vijaya Kumar Reddy Chinnam

              Hello All,


              Please see my attached work book on actual post. Each data source has only single row. The relations i established are matching 100%. But still filter shows NULL.




              • 4. Re: Blending shows null in secondary data source filter
                Ivan Young

                Hey Vijay,

                I think it's default behavior when using a filter from a secondary source even when no nulls exist in the secondary.  There is a way to hide the null which is covered here, Removing Null Values from Filters Based on Secondary Data Sources | Tableau Software.  But I'm curious why you are not using the filter from the primary source?


                Good luck,


                1 of 1 people found this helpful
                • 5. Re: Blending shows null in secondary data source filter
                  Vijaya Kumar Reddy Chinnam

                  Hi Ivan,


                  Thanks for your response. Suppose in this case, if i relate blending only on date field. And on ca_1.txt source , if i have another row

                  "2016-02-26,tg2,I,GL,10,5,60 ". c_tg filter from secondary data source can be used to filter values (in this case tg2), which are only available on secondary data source.


                  The solution you mentioned is not useful because of below reasons.

                  1) This is parameter based solution. In this way, we are restricting the view to only one state at a time. So, this is not a workaround to the problem.

                  2) As they mentioned in the solution, it is not production complaint. i.e. Parameter field could not be refreshed automatically, if underlying data is changed by tableau server scheduler. We need to do step "Under List of values, click Add from Field, and then select Coffee Chain Extract > State.." manually every time.