Tableau Toggle - Remove Highlight
In the last post, we set up the toggle switch, and in this post, we’re going to tackle a few things, listed below:
Add the Toggle to a dashboard tab
Remove extra clicks & highlights from the Toggle button
Change toggle arrows to toggle buttons
Create 2 calculated fields:
Create a calculated field called “TRUE”
Create a calculated field called “FALSE”
Drag these fields to your Marks card onto Detail, like shown:
Create a dashboard tab, and add the Toggle sheet to the dashboard tab
Edit the “Source Sheets” of the existing Toggle Parameter Action (we called it: Toggle Switch ON and OFF); change it from Source Sheets = “Toggle” to Source Sheets = “Toggle Dash”:
Create a Dashboard Filter Action — this will remove the extra clicks and the highlight on the toggle buttons; we can call this: “Toggle - Remove Highlight”
For Source Sheets: Select “Toggle Dash”
Run action on “Select”
For Target Sheets: Select your “Toggle” sheet
Clearing the selection will “Show all values”
Filter using “Selected Fields”
For Source Field, choose FALSE
For Target Field, choose TRUE
Click OK on this window, and click OK on the next window
Now, on the dash, click the toggle buttons over and over to see that the extra clicks & highlights have been removed.
Change toggle arrows to toggle buttons
In your Tableau Shapes folder, create a new folder called “Toggle”, and add your toggle shapes to this folder; for example, I added my buttons here:
Do you want to create your own Toggle buttons? Click here to create your own using Power Point.
Let’s go back to your “Toggle” sheet
Click Shape
Click “Reload Shapes”
Select your Toggle folder in the drop-down where it says “Select Shape Palette”
Click “False” under “Select Data Item:” and select the shape that looks like ToggleON, click “Apply” and “OK”
Click your parameter and switch over to “False” to bring up the left arrow shape
Click “True” under “Select Data Item:” and select the shape that looks like ToggleOFF, click “Apply” and “OK”
Step 4. ToggleON: Toggle shape switch False
Step 5. Select False
Step 6. ToggleOFF: Toggle shape switch True
Next step is to go back to your dashboard tab and click the toggle button over and over to see it working.