Marimekko Charts

A Marimekko Chart (sometimes also called a Mekko Chart) is similar to stacked bar chart, but additionally use varying widths of the bars to communicate additional information about the data. Here, for example, is a Marimekko Chart showing the breakdown of sales by region and department. The width of the bars communicates the total sales for the Region, while the height of each segment gives you the percentage of sales for the Department within the Region:

Creating Marimekko Charts in Tableau leverages the ability to fix the width of bars according to the axis' units.

Clicking the Size shelf when a continuous (green) field is on Columns (thus defining a horizontal axis) and the mark type is set to Bar reveals options for a fixed size. You can manually enter a Size and Alignment or drop a field on the Size shelf to vary the width of bars.

Here are some of the details:

IF FIRST() = 0 
    THEN MIN({EXCLUDE [Department] : SUM(Sales)}) 
ELSEIF LOOKUP(MIN([Region]), -1) <> MIN([Region]) 
    THEN PREVIOUS_VALUE(0) + MIN({EXCLUDE [Department] : SUM(Sales)}) 
ELSE 
    PREVIOUS_VALUE(0) 
END

While this code may seem daunting at first, it is following a logical progression. Specifically, if this is the first bar segment, we'll want to know the sum of Sales for the entire region (which is why we exclude Department with an inline level of detail calculation). When the calculation moves to a new Region, we'll need to add the previous Region total to the new Region total. Otherwise, the calculation is for another segment in the same Region, so the regional total is the same as the previous segment.

Finally, a few additional adjustments were made to the view:

To add labels to each Region column, you might consider creating a second view and placing both on a dashboard. Alternately, you might use annotations.

In addition to allowing you to create Marimekko Charts, the ability to control the size of bars in axis units opens up all kinds of possibilities for creating additional visualizations, such as cascade charts or stepped area charts. The techniques are similar to those used here. You may also leverage the sizing feature with continuous bins (use the drop-down menu to change a bin field in the view to continuous from discrete). This allows you to have histograms without large spaces between bars.

For a more comprehensive discussion of Marimekko Charts, along with approaches that work with sparse data, see Jonathan Drummey's blog post at: https://www.tableau.com/about/blog/2016/8/how-build-marimekko-chart-tableau-58153.