How to make nice tables in Tableau using a placeholder.

by Amalia García-Vellido Santías

Imagine that you have a table in Tableau and you want to colour each measure based on a condition or want to have different marks at the same time.

When you create a table, Measure Names and Measure Values will populate rows or columns and the marks card, and you will have a table similar to the one in the image.

by adding Measure Values to colour and changing the mark to square you would have something like this:

If you right click in Measure Values for the colour mark and choose Use different legends you can split the colour legends in order to have one for each measure

this doesn't give you much flexibility because its not possible to do conditional formatting for a column or a row, imagine you want to create a condition for the profit ratio like this:

And colour that row based on the condition, the rows for Quantity and YoY sales will be coloured as well based on that criteria.

I have a solution for this problem :)

Instead of using Measure Names on rows or colums if you replace the measure name with a placeholder avg(0) or avg(1)  for each of the measures you want to create a Marks shelf, you will be able to create a more flexible table:

Now its just about formatting and renaming the axes (note that I have also swapped between rows and columns to change the layout of the table)

I hope you find this useful!!

Avatar

Amalia García-Vellido Santías

Fri 26 Mar 2021

Thu 25 Mar 2021

Tue 23 Mar 2021