2 Replies Latest reply on Jul 11, 2018 11:52 AM by edgar baltazar

    Left Join a Table then union to the resultant of the left join.

    edgar baltazar

      Hi,

       

      I'm a rookie using Tableau so this might be an easy one to answer... I've one Orders header table (2017 to Date) and a Orders detail table (2017 to date), which I'm left joining in Tableau by the Order ID, everything works perfectly, but the issue is that I have a third table that contains Orders History (Prior 2017) and is already merged into a single table (Header and Detail). This History table contains all of the fields that the details and the header table have, which is the best way to approach this, I've tried UNION the History to both Header or Detail but I don't feel is correct as History table has all of the fields I get duplicated fields either ways.

       

      I almost filed that I should consolidate header and detail tables outside of Tableau and then just UNION this resultant table with the history in tableau (?)

       

      Maybe I'm over complexing this. Any kind of help will be sincerely appreciated.

       

       

      Data example:

       

      Header

       

      DateOrderIDStoreID
      20173WM
      20174SR

       

      Detail

       

      OrderIDProducts
      Amount
      3A100
      4B35
      4C46

       

       

      History

       

      DateOrderIDStoreIDProductsIDAmount
      20161WMA100
      20162WMB35