KNOWLEDGE BASE

Creating 100% Stacked Bar Graph with Multiple Measures


Published: 26 Feb 2020
Last Modified Date: 26 Feb 2020

Question

How to create a 100% stacked bar chart with measure values on row or column shelf.

User-added image

Environment

  • Tableau Desktop 

Answer

Step 1
In the attached sample workbook "StackedBarExample.twbx", create three calculation fields like below.

Calculation Field 1
[Sales1(%)]
SUM([Sales1])/(SUM([Sales1])+SUM([Sales2])+SUM([Sales3]))

Calculation Field 2
[Sales2(%)]
SUM([Sales1])/(SUM([Sales1])+SUM([Sales2])+SUM([Sales3]))

Calculation Field 3
[Sales3(%)]
SUM([Sales3])/(SUM([Sales1])+SUM([Sales2])+SUM([Sales3]))

Step 2
Replace [Sales1], [Sales2], [Sales3] in measure value card with [Sales1%], [Sales2%], [Sales3%].
 
Did this article resolve the issue?