2 Replies Latest reply on Oct 1, 2013 11:03 AM by Matt Lutton

    Expressions in JOIN clauses

    Tom Malloy

      I am trying to add a second table to my data connection.  My original table has a DateAndTime field.  My new table has a Date field.  I would like the JOIN clause to be something like:

        • 1. Re: Expressions in JOIN clauses
          Tom Malloy

          I am trying to add a second table to my data connection.  My original table has a DateAndTime field.  My new table has a Date field.  I would like the JOIN clause to be something like: DATE(DateAndTime) = Date.  Can I use expressions like this in JOIN clauses or can I only use fields?  I tried to add a computed field but that didn't help.  I'm guessing that computed fields are on the client side so this makes sense, in a way.  I assume I can split the DateAndTime field in the database into a Date and a Time field but I am wondering if there is another solution.


          • 2. Re: Expressions in JOIN clauses
            Matt Lutton

            You can set up a data blend using the two fields, but I believe you'll need them to be the same data type in order to use them in a true join in Tableau.  You could probably use the Custom SQL option to join them as well, but I'd opt for changing the data types.

             

            I am not an expert, and someone else may have a much better solution so don't take my word as expertise.  However, this thread seems to confirm what I'm thinking: http://community.tableau.com/thread/118004?start=0&tstart=0