2 Replies Latest reply on Jun 21, 2018 6:15 AM by Charles Castle

    Creating Relationship b/t 2 Data Sources

    Charles Castle

      Hi,

       

      I am attempting to trend data by accounting period. The data being extracted is too large to use one data source, so I've been forced to use two. Both data sources are filtering by accounting period. Say, for example, the first data source contains data from 201701 to 201803, while the second data source contains data from 201804 to the current period. When attempting to create the relationship, I have been using the data source containing data from 201701-201803 as the primary source. In this primary source, I was able to add accounting periods 201804-201807 to the accounting period column, however, I did not add any corresponding data to other columns. I am unable to edit the data in the secondary source. So, when I create the relationship and attempt to trend the data by the accounting period, I can only trend one by accounting period or the other. When trending using the accounting period field from the primary source (201701-201812 because I added the 9 extra periods), it only returns the data from this source and does not include data from the secondary source. I believe the issue is that the secondary source does not include accounting periods 201701-201803 so the relationship does not mesh as it ideally should. I'm not sure whether I'm correct in this, but does anyone have any solutions?

       

       

      Thanks

        • 1. Re: Creating Relationship b/t 2 Data Sources
          Michael Gillespie

          At first blush, this sounds like a UNION is what you need.

           

          Are the columns in the 2 files identical?  You indicate that you have an "Accounting Period" column, so I'm assuming the column structure is the same.  If so, you can easily do a UNION of the 2 files (more or less, stack the second file on top of the first one) and Tableau will see it as one big table with all the accounting periods nicely lined up.

           

          If that is NOT the case (e.g., your date periods in columns, so that the first data source has columns like 201701, 201702, 201703, etc. and the 2nd one has 201804, 201805, etc.), then you might have to PIVOT the data before you try a UNION (and you might not be able to UNION after the PIVOT).

          • 2. Re: Creating Relationship b/t 2 Data Sources
            Charles Castle

            The data is coming from two separate connections (queries) so, unfortunately, I do not think a union would work.