Tableau : Advanced Conditional Formatting

What is Conditional Formatting?

As implied by the name, conditional formatting primarily entails formatting data values based on specific criteria, with color-coding constituting the key component of this data analysis tool.

Tableau enables the concept to be applied even to graphs, which makes visualizations very communicative and engaging.

Why we should use it?

  • highlights patterns and trends in your data
  • great design
  • much more easier to understand

Today we are looking to create the following table which has an advanced conditional formatting option in Tableau.

For my example, I've used the Superstore dataset. I started by dragging the Sub-Category into the rows. Then I've created two calculated fields like the ones from bellow:

Then I've dragged the calculation (1) into the columns and made it an Attribute (ATTR) , then dragged the sales into the detail and color.  

Please note that we need to repeat the same process for both profit and quantity. Make sure to put the profit & quantity measures in the correct fields.

Please make sure that you change it into a bar and mark the labels. You can change the color as you wish and change the format.

After creating the Sales table, you can follow the same steps for the Profit, and Quantity tables (see the bellow picture).  You can also turn them into a circle or square.

After that, we need to put the ( 1 Title) calculation between the first two columns, make it an attribute (ATTR) and click on dual axis. Because you did a dual axis, you will need to remove the measures values from the ATTR (1) field and put them on the new created field ATTR (1 Title) .

Don't forget to add the labels and edit the axis (for the top and bottom)

To edit the axis from the bottom click on Edit axis and remove the title. Make sure you have the values from bellow. Then click on Tick marks and select none for both major and minor tick marks.  

For the upper axis click on Edit axis and put the title (ex. Sales, Profit, Quantity). You can leave the range as automatic. On the tick select none for both major and minor tick marks.  

Again, this should be your final result:

Author:
Ana-Casiana Tarita
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
© 2024 The Information Lab