10 Replies Latest reply on Sep 6, 2017 11:41 AM by Ravi Teja Jagarapu

    Filter Action for two different data sources

    Ravi Teja Jagarapu

      I have two dashboards and each of these dashboards is using a different data source. The common link between the two dashboards is the Member Id. The first dashboard contains how many members are in a particular kind of program.

       

      The second dashboard contains an aggregated table with each member details.

       

      My requirement is that if user clicks on Asthma Management (4 Members), the second view should filter with only those 4 member details. I am not sure if it's the right approach, but I tried blending and it didn't work. I am attaching the packaged workbook for your reference.

        • 1. Re: Filter Action for two different data sources
          Jennifer VonHagel

          Hi Ravi,

           

          I have Tableau 10.3, so you may not be able to open the attached workbook. I'll explain with screenshots as best I can.

           

          Instead of blending the data sources, join them. Some of your measure fields were text (highlighted below), so I created calculated fields to turn them into integers: int(trim([field]))

           

           

          I set up the Bubble Chart, including a calculation countd(member_id), with the member_id being from "Sheet1" table.

           

          I set up the Table:

          I put both these sheets on a Dashboard:

          Then I created a Filter Action:

          Now when you click a bubble, only those names appear. When you de-select the Bubble, the table disappears completely:

          Click:

          De-Select:

          If you want that table on a separate Dashboard altogether, then duplicate the current dashboard, and on the duplicate, remove the bubble Chart, leaving the table.

           

          All the best,

          Jennifer

          • 2. Re: Filter Action for two different data sources
            T G

            Hello Ravi,

             

            As Jennifer suggested use join instead of blending. I have attached the updated sample workbook 10.2. I hope this could help you.

             

             

            TG

            • 3. Re: Filter Action for two different data sources
              Ravi Teja Jagarapu

              Hi Jennifer,

               

              Thank you for the detailed explanation. I created few other charts using the Aggregate Data data source and when they click on those charts, it will take them to the table that I have on Sheet 2. The table is a common one for many charts, so is there a way I can avoid joining these two tables in the data source but still achieve my functionality?

               

              Please let me know if it's not clear and I will try to create some mock up.

              • 4. Re: Filter Action for two different data sources
                Jennifer VonHagel

                Hi Ravi, yes a mockup will help. It sounds like you should be able to fix this by modifying the filters and action filters settings, but without seeing the specifics it is difficult to say.

                 

                I don't think blending will get you there. I played around with it before suggesting the join - putting data into tables rather than charts - and could see that because the two sheets were at different levels of aggregation, the action filters couldn't work.

                 

                If modifying the filters settings doesn't work, I have one more idea, but need to understand more fully the layout you're trying to achieve.

                 

                Best,

                Jennifer

                • 5. Re: Filter Action for two different data sources
                  Ravi Teja Jagarapu

                  Hi Jennifer VonHagel

                   

                  I attached the workbook for your reference. All the charts in Summary dashboard will be linked to table in Member Grid dashboard.

                   

                   

                  I was able to link it for ED Visits and Inpatient Visits as they use the same data source as that of the table. However, I am not being able to link for DMP. Like I mentioned, if the user clicks on DMP chart, the table should filter according to the program selected.

                   

                  Thank you for your help.

                  • 6. Re: Filter Action for two different data sources
                    Jennifer VonHagel

                    Hi Ravi, your data sources here are not joined. Hang on, I'll create a longer reply with screenshots.

                     

                    Best,

                    Jennifer

                    • 7. Re: Filter Action for two different data sources
                      Jennifer VonHagel

                      Ok, in this sample data, all members are in the Aggregate data, and a subset of those Members are in DMP data.

                      • 8. Re: Filter Action for two different data sources
                        Jennifer VonHagel

                        Hi Ravi, I have attached a workbook, but it is 10.3, hope you can open it. But all the screenshots are here.

                         

                        So you have connected to the two data sources (I'll call them Agg and DMP), but in a way that they cannot be joined. I'm going to

                        1. Choose the Agg data source

                        2. Unpivot your measures data in Agg data source: being pivoted makes the join in the next step and setting up your dashboard more complicated

                        3. Connect to DMP in a way that it can be joined to AGG so the filters work across the two data sources

                        4. Modify your DMP worksheet so that the fields come from the newly connected DMP source rather than from the unconnected DMP source

                        5. Put the joined DMP in the Dashboard and clean up the filters.

                         

                        In the data tab, click the data icon and choose the AGG data source.

                         

                        2. Select Data Type and Data Value and Remove Pivot

                        Removing the Pivot will mess up some formulas. let's clean that up. Go to ED Visits tab, right click on your calculation ED Visits formula, and choose Replace References. Select ED Visits, OK.

                        Notice that your ED Visits Bin calculated field is now error-free. Delete the calculated ED Visits. Repeat this for Inpatient Visits and Lab Visits. After that, you can also safely delete "Data Type" and "Data Value".

                        Now let's go back to the Data Tab and set up a join with DMP. Click the Add link from the left window, don't add your data source from the data icon in the right window.

                        Tableau will put both your sources in the right window so you can set up a join. Notice that you can see both your sources together in the left side. In the join window, choose Member ID = Member Id. The join is showing an error, because your Agg Member ID is coming in as String while DMP Member ID is a number. So just click the data type icon in the Agg Member ID table grid (highlighted), and change it to Number.

                        And the join is good:

                         

                        Ok, so we will go to your DMP worksheet, and put the fields from the Joined DMP table in there rather than the unjoined DMP table. Click the Agg data source in the upper left hand corner. Clear the worksheet with the button in in the toolbar. Add the fields from the joined DMP source. Fix the colors however you want.

                        And we can now Close the unjoined DMP source. Right-click on it, and choose Close.

                        Ok, edit your filter so it is like this:

                        And it works .

                         

                        Hope that helps,

                        Jennifer

                        • 9. Re: Filter Action for two different data sources
                          Jennifer VonHagel

                          Yikes, I gave a big long answer that shows how to achieve this functionality by joining the data sources, but you asked specifically for a way to do it without joining.

                           

                          Is there a reason you don't want to join? Is the join creating a negative impact for some other functionality you wish to achieve?

                           

                          Best,

                          Jennifer

                          • 10. Re: Filter Action for two different data sources
                            Ravi Teja Jagarapu

                            Thanks Jennifer. I appreciate your help and patience.

                             

                            I thought if we joined, we should be creating multiple member tables to support the drill down for the charts. I may be wrong and I will re-visit your earlier solution again and try to join the tables.