One of the many helpful features in Tableau is the ability to create dynamic text boxes that update depending on user selection or other events on the dashboard. It’s a common practice to use parameters in text boxes. That’s why I would like to offer a few tips and tricks in this post to enhance your dashboards and reduce the effort involved when updating text boxes.
Dynamic Text Boxes Using Parameters
Text boxes are often used in Tableau to display varied information based on a parameter. For example, we could have a parameter determine how a table is sorted and a text box explaining that sort. When a user changes the value of the parameter, this selection is also reflected in the text box. This is accomplished by using the Insert option in the top-right corner of the text box editor and selecting the parameter:
The Problem with Dynamic Text Boxes
There are two key issues with using dynamic text boxes:
- When using text boxes with the same text on a series of dashboards, each text box on each dashboard must be updated whenever a change is required. As the number of dashboards increase, this can create a significant risk of a text box being accidentally skipped. It will take more time than necessary to update the dashboard.
- The dynamic nature of the text is limited to parameters.
Solving the Problem with Sheet Titles
Dynamic text boxes can be powerful; however, you can accomplish far more by using dynamic sheet titles instead of text boxes. Here are two ways you can do this:
- Use a blank sheet instead of a text box. The sheet can be dragged into as many dashboards as desired. You can also use parameters exactly like you would in the text box method. When using this method, updating the workbook requires updating a single sheet title instead of updating every occurrence of the text box:
- Titles of sheets can make use of any field in the data source in addition to parameter entries. For example, we could include the total Sales/Profit in our title:
Using Calculated Fields
By using calculated fields, the true potential for sheet titles can be realised. In the following example, we have allowed filtering by segment and we built a dynamic text box to reflect it. This includes two calculated fields that make minor adjustments to the text. The first determines whether the word “the” needs to be present in the text, and the second determines whether the word “segment” should be plural:
To see an example of this in action, check out my dashboard on Tableau Public below and reach out to us if you have any questions. Thanks for reading!