Search code examples
tableau-apidashboardrserve

How to postpone calculations in Tableau?


In Tableau dashboard it is possible to create a number of elements (like sliders) which can be used by user to set values of some parameters. Further these parameters are used in combination with data as input for some calculations. The results of the calculations are displayed back to the user.

The default behavior of Tableau is that the calculations are triggered each time as soon as one of the parameters is changed by a user. It might be not optimal if there are many parameters and each recalculation takes several seconds. A user might want first to set the values of all parameters and only then trigger the calculations.

How can one get this behavior?

ADDED

I found out that I can choose "pause auto updates" (here). In this way a change in one of the parameters does not trigger the calculations (as I want). Then I can trigger the calculations (after all parameters are changed) by pressing "Refresh" button. The problem with this solution is that I, as a dashboard developer, have this button but the user will not have it. I guess the user can also update the dashboard by pressing F9 button on the keyboard, but it might be not user friendly. I would prefer to put a "Refresh" button into the UI (into dashboard directly). Is it possible?

ADDED 2

Here I see a question that is identical to mine. The proposed solution is to use "Pause" and "Run" buttons. However, as I have already mentioned, it does not seems to be a "full solution" since it works only for the developers of dashboard and not the final users (since they do not have access to these buttons). So, my question remains: How can I add the "Pause" and "Run" buttons to the dashboard?


Solution

  • You can factor out portions of your dashboard, such as user input, into HTML inputs and then use the Tableau JavaScript API to control aspects of Tableau's behavior, such as when it refreshes. You can then style your controls with CSS etc. At the cost of maintaining a bit of HTML and JavaScript.

    It may not be worth the hassle compared to just putting a note on the dashboard to say, "use pause and resume when ..." but it does give you more control over look, feel, behavior and integration with other apps