Marimekko Part 4: Basic Marimekko


Marimekko Part 4: Basic Marimekko

by Rob Austin

In Part 3 we created all the calculated fields necessary for our basic Mekko. Because we have preset the DTC (Direction of Table Calculation) for each calculated field we can simply drag them on to the view to create the mekko and be confident that the values will match our table.
Mark Type: Polygon
Color: [Y Dimension] (sorted ascending along sum of sales to align the ledgend)
Path: [Point]
Detail: [X Dimension] (sorted descending along sum of sales to show the biggest first)
Columns: [X Axis]
Rows: [Y Axis]

The figures / labels on the Mekko are the next step. We are going to have to create another 3 calculated fields to get them in the correct position.

[Label X]
IF ATTR([Point])=3 THEN [X Axis] – [X%]/2 END
This field creates another cartesian point between points 2 & 3.


LEFT(STR(ROUND([% of Y within X],3)*100),4) + ‘%’
This field ensures that the label displays below the line for each element.

[Text (Hidden)]
IF [X%] > 0.05 THEN [Text] END
This is an optional field depending on your data which hides labels where space is limited.

To display the labels in the same view we are going to make use of Dual Axis and then synchronize and hide the second axis. For the 2nd Axis we should have the following settings:
Columns: add Label X to the right of the existing X Axis
Mark Type: Text
Text: [Text] or [Text (Hidden)]
Detail: [Y Dimension], [X Dimension], [Point], [% of Y within X]

This version of the Marimekko chart requires full data densification (i.e. you need to have a row of data for each combination of X Dimension & Y Dimension). If you are missing a row of data then the running calculations will not compute correctly and will not add up to 100%. Try Selecting Y Dimension > Department and X Dimension > Container to see the issue in the viz above.

We will solve this issue in Part 5 of the blog and add some totals.

More About the Author

Rob Austin

Using Tableau on your Mobile I have been using Tableau since version 4, initially as a Tableau customer. One of the first things I wanted was to be able to see my ...
Tableau Level of Detail Calculated Fields v9 In this tutorial I talk about the Tableau Level of Detail calculations  {fixed}, {include} and {exclude} which are new in Tableau ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072


Love our blog? You should see our emails. Sign up for our newsletter!