Dynamic Title Shows 'All' when No Data is in the View

Issue

When using a calculated field in a dynamic title, and all of the data is filtered out of the view, the dynamic title might be displayed as "All".

Environment

Tableau Desktop

Resolution

Use one of the following workarounds:

Option 1

Use a dynamic title based on a parameter.

Step 1: Connect to Data

Open a new workbook and connect to your data source.

Step 2: Create a Parameter

In the Data pane, click the caret at the top right of Dimensions and select Create Parameter.

In the Create Parameter dialog box, name the parameter. In this example, the parameter is named "State Select".

Under Data Type, select String.

Under Allowable Values, select List.

Click Set From Field and select the desired field.

Add All to the list of values.

Step 3: Create a Calcuated Field for the Filter

Go to Analysis > Create Calculated Field.

In the Calculated Field dialog box, type a name for the field. In this example, the field is named "State Filter".

Type the following into the Formula field:

[State] = [State Select] or [State Select] = "All"

Click OK.

Step 4: Create a Calculated Field for the Title

Go to Analysis > Create Calculated Field.

In the Calculated Field dialog box, type a name for the field. In this example, the field is named "Dynamic Title".

Type the following into the Formula field:

IF [State Select] = "All" THEN "Information for all Cities within the United States" ELSE "Information by City for " + ATTR([State])END

Click OK.

Step 5: Create the View

Drag State Filter to the Filters shelf.

Select True and click OK.

Right-click State Select in the Parameters pane and select Show Parameter Control.

Drag Dynamic Title to Detail on the Marks card.

Place City on the Rows shelf.

Place Sales on the Columns shelf.

Drag Sales to Text on the Marks card.

Navigate to Worksheet > Show Title.

Right-click on the title in the view and select Edit Title....

Clear the current title and navigate to Insert > AGG(Dynamic Title).

Click OK.

Option 2

Add a Size() calculated field to the Detail and Filter shelves that computes using the calculated field in the dynamic title.

Option 3

In some situations (including when duplicating a dashboard, or when table calculations for the field are edited) the field used for the title will be appended with a number in parentheses. Removing this number may correct the behavior. Edit the title, removing the number after the field name, between the <> escape characters. For example:

Original Title: Here is my title and a value: <AGG(Field Name) (3)>

Corrected Title: Here is my title and a value: <AGG(Field Name)>

Cause

This behavior is related to a known issue that is currently under investigation.