2 Replies Latest reply on Apr 7, 2017 10:35 AM by Karthik Venkatachalam

    Problem with Joining Tableas

    Ramin Melikov

      Hi,

       

      I have 2 tables in SQL Server. I need to join them. However, when I do, I am not getting the correct number of rows.

       

      Here is the case

       

      Table A has 7262 rows when I specify a certain date.

       

      Table B is a master table.

       

      When I do a Left join, with A being on the left, I expect the result to have 7262 rows. And in fact, when I do the query in SQL, I get exactly that.

       

      However, when I do it in Tableau, I get 7258 rows. And it doesn't matter which join I do (left, inner, right, or full outer).

       

      How do I fix this?

        • 1. Re: Problem with Joining Tableas
          Galen Busch

          Without having access to the data, I couldn't dig into this.

           

          I have a sneaking suspicion is has to do with the specificity of the underlying granularity of the VizQL query (Tableau's back-end language.)

           

          I haven't encountered this issue, but I rarely do my joins in Tableau for performance reasons.

           

          Can you upload your sheet to SQL server, join there, build a view, and connect Tableau to that view?

           

          Galen

          • 2. Re: Problem with Joining Tableas
            Karthik Venkatachalam

            Agree with Galen, its hard guess without looking at it.

             

            But, if I were to guess without looking at it, its possible those 4 records are caught in difference in way date/time filter is applied, as you "Specify" a certain date.

            Does your Date have time field attached to it? Are you truly looking from 12 am?

             

            Can you try Custom SQL and see how many records you get? vs SQL.