4 Replies Latest reply on Oct 15, 2018 4:12 AM by Tim Dines

    How to pass action filter parameter in custom SQL?

    Rahul Khandelwal

      Hello Everyone,

       

      I have a requirement in my Tableau dashboard that i want to pass action filter into custom SQL as parameter?

      Is it possible or is there any way to do it in Tableau.

       

      Details:

       

      I have a dashboard which shows data of different sales order numbers and i want to click on any number and generate another dashboard on run time that shows details about a particular

      number that is clicked.

       

      I do not want to keep another dashboard pre-populated with all order numbers and then action filter it on click as there are millions of order numbers and then i would have performance issues.

       

      So, i want to click on any order number and then that order number get passed in my Custom SQL that generates my dashboard for that order number only. So, basically i want

      dynamic functionality.

       

      Please suggest if it is possible or if there is any work around. It will help me a great deal.

      Please feel free to revert in case of any further questions.

       

      Thanks,

      Rahul Khandelwal

        • 1. Re: How to pass action filter parameter in custom SQL?
          Tim Dines

          I don't believe there is a need to run custom SQL each time a number is clicked.  You can create calculated fields and parameters that will correctly populate the dashboards based on the user click.  There is no need to create a huge number of dashboards, just the fields that will dynamically populate a few of them.  It seems as though you are probably new to Tableau.  I would recommend looking at the sample dashboards and at some of the training pieces that address this topic.

          • 2. Re: How to pass action filter parameter in custom SQL?
            Rahul Khandelwal

            Thanks Tim for your quick response.

             

            Yes, i am new to Tableau. I want to know if its possible that a custom sql parameter takes value of a user click?

             

            Also, regarding your suggestion about using calculated fields and parameters, i suppose you are talking about doing it

            through action filters if i am not wrong.

             

             

            Thanks,

            Rahul

            • 3. Re: How to pass action filter parameter in custom SQL?
              Sankarmagesh Rajan

              Hi Rahul,

               

              We can use parameters in custom sql and get selected data.

               

              No way to get action in custom sql.

               

              thanks

              sankar

              • 4. Re: How to pass action filter parameter in custom SQL?
                Tim Dines

                I don't mean to use action filters.  I believe that most things that we want to do with interaction can be handled by creating parameters and then using case statements and other calculated fields to act upon the user choices.  I spend a lot of time creating things for researchers and they find it extremely helpful to have a "Sandbox" in which to work with data and do their own discovery.  When I create a sand box, There are 6-10 parameters and the associated fields.  I add in a sheet swap so that they can choose the type of visualization they are creating, but there are no action filters unless we are linking to something on the web.

                 

                Sorry for being so long winded, but I really believe you will go far by learning to use parameters.  As far as the SQL goes, I don't believe you are going to find a way to launch custom SQL statements using your parameters.  The only thing close to this that I have done is using a parameter in the initial SQL in order to present users with just the data they have rights to, limiting the dataset that is pulled based on AD Groups.