How to Keep Shapes from Resizing in Tableau

By: Eric Parker

Pro Headshot.jpg

Eric Parker lives in Seattle and has been teaching Tableau and Alteryx since 2014. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email. You can also sign up for a Tableau Office Hour to work with him directly!

I recently received an email from a blog reader who was trying to solve a problem I’ve come across several times. He was representing populations on a map of the world in a chart that looked something like this.

172-1.png

As you can see, there are a few different sizes of circles on this map representing varying population sizes of countries in the world. One of the problems of utilizing Tableau’s default sizing is that when we adjust the filter so the worksheet only includes countries of a certain size, the shapes re-adjust to fit the data.

172-2.png

By filtering out any country above 1,000,000,000 people, you can see that while previously the largest circles represented only India and China, there are now numerous large circles representing countries including the United States, Brazil and Indonesia.

One possible solution to this problem is through custom shapes.

I created a custom shape palette with PNGs representing four different sizes of circles.

172-3.png

Then I created a calculation to break the population sizes into four buckets.

 
172-4.png
 

Next, I changed the mark type of the worksheet to Shape and chose the Circles palette from a couple steps ago and matched up the outputs to the proper shapes.

172-5.png

The Population field can now be removed from the Size tab in the Marks card so there are four distinctive sized circles.

172-6.png

And now the best part is that even if the filter is updated, the remaining circle sizes remain the same as before.

172-7.png


Please check out our upcoming classes and office hours if you are looking to dive even deeper!

Nested IF Statements in Tableau (Video)

No Python? No Problem. The Secret to Living Connections on Tableau Public.

0