Have you ever worked with a filter on a dimension in Tableau, and when selecting ‘All’ you get that annoying * in your Tooltip? This * can sometimes ruin you otherwise nice formulated tooltip.
If you for example work as a department manager, you often want to be able to see KPI’s for your department, but sometimes it can be relevant to see it for the entire company as well. However, if you have a nice tooltip refering to you selections in your filter, selecting ‘All’ will give you the famous * in the tooltip. The star appears since we are summing on a string, which is not possible.
Often we do not recommend working with attributes in this way, but sometimes it can be necessary to keep it in the tooltip, making the star very annoying…
Fear not! There is a solution to this, but is a bit of a workaround. Let’s go through the steps. I use the data from Superstore, where I want profit shown for each segment, and giving the user the option to filter on category.
Step 1: Creating a parameter
First step is to create a parameter selecting all the values of the category. This parameter will be the used as a filter selecting the view. Remember to show your parameter control on the view. See settings for creating the parameter:
Step 2: Create a field shown in tooltip
The next step is to create a calculated field, which is shown in the tooltip. This field needs to indicate what you want written in the tooltip, when you select a specific value in the parameter. Notice that the parameter is purple in the calculated field. In my example, I want the tooltip to show ‘All’ when I select ‘All’ in the parameter control. See how the calculated field is configured below.
This created field (‘Tooltip’) is then dragged on to tooltip and configured as wanted.
Step 3: Create the connection between category and parameter
The next step is to create the calculated field, which connects the created parameter and the dimension you initially wanted to filter on.
We want to show all rows, when ‘All’ is selected in the parameter, and we only want to show certain rows, when specific values in the dimension are selected. Hence, when I select furniture in the parameter control, I only want the rows for the furniture category. The field is therefore calculated as below:
This calculated field is then added to the filter shelf, where we only select ‘Show’.
Now you have a way to show ‘All’ in your tooltip when selecting ‘All’ in your filter, instead of that annoying * we usually deal with!
I hope this was useful reading.