8 Replies Latest reply on Nov 19, 2017 11:42 AM by Tyler Garrett

    Filtering across multiple data sources using parameters

    Mohit Shroff

      I am referencing the tutorial url below:

      Filtering Across Multiple Data Sources | Tableau Software

       

      I have 2 worksheets which are using 2 different data sources and I have displayed them in a dashboard where I want to use 3 filters and all the graphs in the dashboard should change based on my filter selections.

       

      I am using parameters to create filters and adding the calculated fields in respective worksheets to filter values but the graphs are now empty. Not sure what am I missing here.

        • 1. Re: Filtering across multiple data sources using parameters
          Tyler Garrett

          Good afternoon Mohit,

           

          Sorry for the possible frustration, sometimes online tutorials can be hard to follow. After revisiting this tutorial I do realize they have a workflow here that's a bit out of date. I will head over to the idea forum and mention it there.

           

          If you're speaking to the usage as I'm assuming from your post. I do believe the attached workbook will help you understand how Tableau handles this use case.

           

          If you have any more questions please feel free to ask here. Have a good week Mohit!

           

          Best,

          Tyler Garrett

          Dev3lop

          1 of 1 people found this helpful
          • 2. Re: Filtering across multiple data sources using parameters
            Mohit Shroff

            Thanks for the super fast reply Tyler. I was able to get my parameters to do what I wanted.

             

            I have a new problem now and searched around in the Tableau forums with no known solution.

             

            Is there a way to select multiple values from the drop down menu using parameters? I know I can do this using set filters but I dont want to use them because Tableau takes longer to load with them.

            1 of 1 people found this helpful
            • 3. Re: Filtering across multiple data sources using parameters
              Tyler Garrett

              You and everyone else wants this Multi-Values Parameters

               

              many to many solution here.

               

              You can "hard code" the value like - [Region]='South' and [Region]='North' ---- which can give it multi values.. but again it's all hard coded.

               

              If you're leveraging the same source, and the only thing stopping you is many to many. Recommend solving w/ SQL and avoiding the limitations of parameter usage all together.

               

              -TylerG

              2 of 2 people found this helpful
              • 4. Re: Filtering across multiple data sources using parameters
                Mohit Shroff

                Thanks for the link Tyler. I noticed the issue has been in development for a long time now. So from what you're saying, if I have a filter with 10 values and want to hard code it for multiple filters it will make the filter redundant because I will too many values in it.

                 

                I am using parameters because I am using different data sources. Is this a dead end? The only alternate solution I am using now is to use a different sheet for every filter, but that's wasting a lot of real estate on my dashboard and I would want a drop down menu for the values.

                1 of 1 people found this helpful
                • 5. Re: Filtering across multiple data sources using parameters
                  Tyler Garrett

                  Is it all housed under one datasource? Like you're pulling 4 tables from SQL server?

                   

                  -TylerG

                  1 of 1 people found this helpful
                  • 6. Re: Filtering across multiple data sources using parameters
                    Mohit Shroff

                    Yes data source is same. We fed multiple excel sheets in a single SQL database that has 12 tables.

                    1 of 1 people found this helpful
                    • 7. Re: Filtering across multiple data sources using parameters
                      Tyler Garrett

                      12 tables is a lot of SQL but it's manageable and we can make this a many value drop down with a little planning & a good size of sql. Send me an email and I can send over some sql examples, sample data, and explanation of the solution in powerpoint.

                       

                      Here's the solution heavily explained on linkedin

                       

                      Tyler Garrett

                      Dev3lop

                      1 of 1 people found this helpful
                      • 8. Re: Filtering across multiple data sources using parameters
                        Tyler Garrett

                        Hello Community, UPDATE: Here's the solutions explained/blogged/and awesome. I've done this with 30+ datasources and honestly it's WAY faster than spreading your sources out.

                         

                        Also no fuss with parameters anymore.

                         

                        Quick apology:: I was anticipating having time to clean up this old powerpoint deck, & blog it next week.. Nevertheless it's important to get this out there even if it's messy. For the sake of time, I can feel my newly wed wives eyes beaming down on me now saying "you're blogging what tonight?", For the sake of my life - Here's the basic approach and, promise, will circle back with a good tutorial/blog/catpics/gifs on it as soon as I have time.

                         

                        This as a great opportunity to hear feedback if I'm doing something incorrectly or you're familiar with a better option(s?). Please tell me because I would love to go and fix it ! I'm presenting this in a training course on Friday and would love to know another approach if anything. Many thanks.

                         

                        Mohit used the following slides to work through this particular use case.

                         

                        wasdwasdwasd

                        wingdings!

                         

                        The 3 Union Musts:

                        1.Column Headers spelled the same

                        2.Columns in the same order per select statement

                        3.Columns are the same data type

                        The 2 Solution Musts:

                        1.Report Flag Created and used in filter shelf per viz (maybe im just scared and like to use it, un-must it)

                        2.Null or Zero out columns from other tables

                         

                        I explained this to a friend recently and he jokingly said 'do it in rest api'.... He's a smart *** and knows I'm still catching up in that department . So this is doing it in SQL to a spreadsheet. The screenshots are from Tableau Desktop because it worked. Mohit explained it was also successful for him too! Yay. Furthermore I've successfully used this on SQL Server, Oracle, Excel,... More than likely because it's utilizing a common SQL function - it will work for your data source/sources too.

                         

                        Okay have a good night!

                         

                        Tyler Garrett

                        Dev3lop

                        1 of 1 people found this helpful