4 Replies Latest reply on Sep 2, 2016 10:05 AM by Chintan Somaiya

    Issue while using multiple sources

    Chintan Somaiya

      Hello,

       

      I have just started using Tableau and I've run into a question/issue. I tried to look if this or similar issue has been posted earlier but could not find any answer that resolves my question/issue.

       

      I'm using two data sources (one oracle table and one excel sheet). Broadly the data is described as below. In short, there is a One to many relationship from data source 1 to data source 2. Now since they are different data source, I have to manually create a relationship between them and I did that on column P_Id. The vision of output is a table with the contents of source 1 in sheet 1, a table with the contents of source 2 in sheet 2. In the dashboard, I will display sheet 1, and then have an action filter such that if P1 is clicked it would display the rows of P1 from source 2 on the dashboard and so on.

       

       

      Source 1 (Oracle table)                                                                 Source 2 (Excel Sheet)

      P_id | P_Name | P_Address | P_City|...                                         P_id|PC_name| P_Cage1|PGendr

      -----------------------------------------------------------------------------------------------------------------------------

      P1    | PN1       | Padd1 | PCity1                                                      P1 | C1 | 15 |M

      P2    | PN2       | Padd2 | PCity2                                                      P1| C2 | 8  | F

      P3    | PN3       | Padd3 | PCity3                                                      P1 | C3| 7 | F

      P4    | PN4       | Padd4 | Pcity4                                                      P2 | C4| 9 | F

                                                                                                             P2 | C5| 11| M 

                                                                                                             P2 | C6| 7 | M

                                                                                                             P3 | C7| 17 | F

                                                                                                             P3 | C8| 12 | M

                                                                                                             P4| C9 | 10 | M

       

      Now before even reaching the dashboard, when I try to add P_Id, PC_name, P_Cage1, PGendr in sheet 2, the output has asterisks whenever there are more than one rows for P_Id. So my output looks like below. A little research suggested that tableau behaves this way (asterisk) when there are multiple rows for a single column which is used as a join. Not sure if I was able explain the problem correctly. Any help is appreciated.

       

      P_id|PC_name| P_Cage1|PGendr

      P1| *| *|*

      P2| *| *|*

      P3| *|*|*

      P4|C9|10|M

        • 1. Re: Issue while using multiple sources
          Tom W

          It doesn't sound like you need a relationship between these two sources at all. Set them up as separate sources, then setup your 'source 1' sheet with the parent record from datasource 1 then create a second sheet with the low level detail from datasource 2.

          Put them both in the dashboard and create the actionfilter on the ID field and it will filter sheet 2 based on the ID from sheet 1.

          • 2. Re: Issue while using multiple sources
            Chintan Somaiya

            Thanks Tom W,

             

            So I removed the relationship that I'd set earlier but now when I try to add 'source2' fields to 'sheet 2', I cannot proceed. I get the below error. Again, just to re-iterate source 1 is an oracle table and sour 2 is an excel file (Not sure if that makes a difference though).

             

             

            Appreciate your quick response.

            • 3. Re: Issue while using multiple sources
              Tom W

              It sounds like you're mixing fields from both sources. In your explanation at the top, I read it that you weren't combining sources at all but rather, Sheet 1 would source exclusively from Source 1 and Sheet 2 would source exclusively from Sheet 2.

              • 4. Re: Issue while using multiple sources
                Chintan Somaiya

                Actually, I wasn't mixing the fields but just to disprove it, I created a new tableau file and then added these sources, without creating any relationship between them. It worked as I expected, So my guess is that due to a lot of filters and other actions in my initial tableau file I was getting unexpected results. With a fresh file, I'm good.

                 

                Thanks for your help Tom W. I'll mark your earlier answer as the correct one.