3 Replies Latest reply on Jul 12, 2018 12:11 AM by lei.chen.0

    Comparing two different data source

    manan kedia

      Hello,

      i connected two data sources in tableau in different worksheets. Now i want to do a comparison of a column present in these data sources. But without joining the data sources. How shall i go about doing it?

       

      Thanks in advance

        • 1. Re: Comparing two different data source
          lei.chen.0

          Hello manan,

           

          Fairly a unique requirement

           

          What aspects of the column are you going to compare?

           

          For example,

           

          - column name

          - number of rows in the two data sources

          - number of non-null values in the two columns

          - distribution of the values in the two columns

          - if the values in the two columns are identical

          - set comparison (intersect, union, only in on column)

          ...

           

           

          Regards

          Lei

          • 2. Re: Comparing two different data source
            manan kedia

            Hello Lei,

            I'll elaborate.

            I have two worksheets - worksheet 1 and worksheet 2.

            Worksheet 1 has table 1 - containing columns (store number and sales)

            Worksheet 2 has table 2 - containing columns (store number and Previous sales)

            Now i need to compare sales with previous sales, store wise.

            But i cant join both worksheets on the basis of store number because that leads to incorrect numbers.

             

            Thanking you

            • 3. Re: Comparing two different data source
              lei.chen.0

              Hello manan,

               

              In your case, basically data connection options could be,

               

              1. Join

               

              Before joining the tables on [store number], please aggregate the sales to store level, in other words, to keep [store number] in both tables unique.

               

              This process is to be carried out outside Tableau Desktop.

               

              manan kedia wrote:

              But i cant join both worksheets on the basis of store number because that leads to incorrect numbers.

              The cause of "incorrect numbers" might be join without aggregation.

               

              2. Union

               

              You can use the field [Table Name] to specify tables.

               

              The limitation is that, union doesn't support cross-databases.

               

              3. Data Blend

               

              For more information, please refer to Blend Your Data

               

              4. Custom SQL

               

              Write a SQL to do the similar thing as Option 1.

               

               

              Regards

              Lei

              1 of 1 people found this helpful