When use what? - Part 5 - Switch colour palette with parameter

Parameters in Tableau are very versatile. They also allow the user to switch the colour palette! So, if you cannot decide the verse of your colour palette, you can have both! How?

STEP 1

Create your viz.

step1

STEP 2

Create your parameter as a string and add a list (color1, color2):

step2

Then, show the parameter (click on it in the parameter shelf and select “show parameter control”) and also create a calculated field:

calc field param

Here is the trick to switch the colour palette. Basically, in the calculated field I used profit to reverse the selected colour palette in order to have control of it through the parameter control.

STEP 3

Drag the calculated field “Activation Parameter” on the colour mark and select your favourite colour palette (if you want center it in 0):

step3

Now, you can play with your filter!

finalview

Hope you enjoyed.

A presto!

 

Author:
Simona Loffredo
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab