Elaine Chen
By Elaine Chen

Posted 1 minute read

Before getting into the article, I would like to present you with the following diagram. If this could be the effect you expect, let’s get started!

Environment
Tool: Tableau Public
Data: Link
Note: The data is from World Health Organization, and there is a detailed explanation of every parameter in the first sheet of the Excel.

Tips: You can directly jump to Step3 & Step4 to check how to apply the calculation for marking specific bars.

Step1: Create Data Source

In this article, I use the income sheet, one of the sheets in DisabilityPrevalence.xlsx, as the data source.

Step2: Create A Worksheet

Drag parameters Cause Name and Mean from the Data pane to the Columns and the Rows respectively.

Step3: Create A Calculation

In this example, I managed to filter the bars that contain the word “musculoskeletal”. Select Analysis > Create Calculated Field You can design a calculation as shown, or design one for your use.

Step4: Drag Calculation to the Color Block in Marks Pane

Then, we can drag the calculation from the Data pane and drop it into the Color block in the Marks pane.

From the image above, the bars are divided into two types, one is ‘Null’ and the other is ‘Highlight’. Since I didn’t name the Cause Name without ‘Musculoskeletal’ word in the calculation, the blue ones are named ‘Null’ in the filter block.

If you prefer other color settings, you can change the color of both types of bars via “Edit Colors…” in the color block.

Like the presented chart below.

Hope this article is helpful to you. If you know any alternative tricks that are more efficient, I’d love to hear about them! Any feedback is appreciated!

Leave a comment