top of page

How to Switch a Background Image with a Selection

In this example I created this Tableau dashboard to mimic the different links for this website. If you hover over worksheet with the different websites, the background image changes.

I used the following spreadsheet as my data source;

I created a sheet called Background Images.

I created the following calculated fields in in my Tableau workbook;





I placed the X calculated field on the Columns shelf. I then placed the Y on the Rows shelf. I made both of these measures Averages instead of summing them.

I put Page on the Detail Marks card.

I made both the X and the Y axis as a Fixed Range with a Fixed End of 1.

I went to the Map menu, selected Background Images and then selected my datasource.

On the Background Images pop-up menu I clicked on the Add Image button.

I named the first Background image Home.

I navigated to where I had an image of the main page saved as a jpeg.

I entered a 1 in the Right field for X and then entered a 1 for the Top field for Y.

On the Options tab, I checked the box for Always Show Entire Image.

I clicked the Add button selected the Page measure and then clicked on Main for the Page Measure Value.

I clicked OK and OK again until I was back on the Background Images main pop-up menu. I repeated these steps for each of the different pages.

I also used different images for each Page and clicked OK when I was finished.

I created a Header Buttons worksheet that I would use to filter the dashboard. I used the method specified in this Tableau Tip for creating "buttons."

Notice I had to add the URL field to the Detail Marks card below for a URL action later.

I placed the Header Button worksheet at the top of my dashboard and placed the Background Images worksheet at the bottom. I added a filter action on the Header Buttons worksheet. I changed this action to Hover.

I also changed the clearing the selection option to keep the filtered values. This prevents a view from getting stuck.

I then added a second URL action on the Header Buttons worksheet to go directly to the URL webpage if the user clicks on the button.

The only other housecleaning actions I performed was to adjust with the background colors, adjust padding, remove axis's, and grid lines etc.

222 views0 comments


bottom of page