4 Replies Latest reply on Jan 4, 2018 8:22 AM by Mahfooj Khan

    Parameter to control source file

    Robert Smith

      Hello, I am trying to figure out how to create a dynamic parameter that interacts with the source file the tableau file is communicating with.

       

      My source file is an excel sheet with stock data and one cell that controls which data is populated. For example, in the excel file you change one cell and the whole file updates with that specific stock's data.

       

      Is there a way inside Tableau to create a parameter that can control this cell and automatically update in the tableau file? Would like to not pull in multiple stocks at once, just a single quick look at one stock.

       

      Any help is greatly appreciated!

       

      Thank you

        • 1. Re: Parameter to control source file
          Mahfooj Khan

          Hi Robert,

           

          You can connect your excel file with legacy connection and write custom sql statement to query your data from that. In your custom SQL you can use parameter in your WHERE clause which will restrict the data and pull the relevant information.

          e.g In below example I've written a SQL statement and created a parameter based on [User] field.

          Parameter

          then I've included [Select User] parameter in SQL statement to filter the data based on selected User.

          Once done then go to your worksheet and select user from the parameter and check whether its returning the relevant information for that user or not.

          Sample workbook v10.4 attached for reference. Let us know if this help.

           

          Mahfooj

          • 2. Re: Parameter to control source file
            Robert Smith

            Mahfooj, that is very helpful.

             

            Do i have to have a specific version of tableau to create a customer SQL connection? Going through the tutorial on Tableau, it mentioned that the excel file had to be created before Tableau 8.2, but my excel file is the latest version and was created yesterday. If you have any good resources of how to open the file with a legacy connection, please let me know.

             

            Thank you for the help

             

            Robert

            • 3. Re: Parameter to control source file
              Robert Smith

              Mahfooj, disregard the last point. I figured out the connection. Trying to work with the data now.

               

              Thank you!

              • 4. Re: Parameter to control source file
                Mahfooj Khan

                That's cool! Going forward if your required anything you can search here. Tableau KB article is very good source of knowledge.

                Knowledge Base

                 

                If my given solution helps you to achieve the expected output then you can mark my answer as correct/helpful so that it may help others who have similar query and this thread will get invisible.

                 

                Mahfooj