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.
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.
We can use parameters in custom sql and get selected data.
No way to get action in custom sql.
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.