Custom Drop-Down menu in Tableau
Back in the day, when I was seeing the default drop-down list on my viz compare to other custom button I made — it is a bit lame, isn’t it? Here
Do you see my point? There are six buttons beautifully made in a lilac round shape, yet the dropdown makes them look like they don’t harmonize well.
So, here the expected custom drop-down list that I would like to make:
The steps:
- Create a parameter of the drop down list
Values are populated statically from other dimension called Campaign
2. Create a new sheet named ‘btn_drop down’
I’ve prepared the background button as below and put them into folder Shapes under My Tableau Repository
Then create a new parameter named ‘p_switch parameter’ to determine which shape or background-button would be displayed accordingly to its value
Then create a new calculation field named ‘c_switch calc’
The idea of making a calculation field named ‘c_switch calc’ is to use this field to distinguish the the used button.
Change the Mark Type from Automatic into Shape
Then pull the ‘c_switch calc’ into Shape
After reload the shape, the new button will be displayed and ready to use.
An “Entire View” is chosen, then set up the background-button for “False”
It looks like this after clicking OK
for “True”, the setup will be like this
3. Create a new sheet named “list_drop down”, this sheet will consist all the values of the parameter created earlier on step #1
Then create a new calculated field named “c_campaign_calc” with the logic as follows
This logic will have Boolean data type based on the condition. This field will be used to coloring the active campaign on drop-down list
Get Yeni W’s stories in your inbox
Join Medium for free to get updates from this writer.
Then a create new calculated field named ‘c_switch opposite’ as below
This field will give an opposite value of p_switch parameter
On this sheet, Bar is chosen on Marks Type
- Re-color the list using #aeb4f6 and #474de4 as follows
- Update font-color into white
- Maximize the size on Marks Card to avoid white space between the option list
4. Create a new sheet named “blank_drop down”. This sheet is gonna be put on top of another sheet for parameter action
- put c_switch calc and c_switch opposite on the detail marks
- choose the Shape on Marks Type
- Maximize the size on the Marks Card
- Ensure to put None on everything at Format Border and Format Line to avoid any line would show up
4. Back on the dashboard, setup up the new custom drop-down list will begin by
- Drag the sheet btn_drop down onto the dashboard using floating layout
- Create Text Object which contains value of the p_campaign
put the text object on top of the background-button
- put ‘list_drop down’ sheet under the button as follows
- put ‘blank_drop down’ sheet on top of the text object
Ensure to remove the worksheet color (background color) to None and resize the sheet until fit in with text object.
5. On the final step, let’s compose some action towards the drop down list:
- Go to Action at Dashboard Menu, then Add Action >> Change Parameter, setup the value as follows, click OK
- setup another parameter action named ‘p_switch toggle’. There are two sheets as the source which are blank_drop down and list_drop down, target parameter is p_switch parameter, and the source field come from c_switch opposite
Here the final look:
Further exploration can be performed at my viz : Digital Ads Performance Dashboard







