In Part 4 of the blog we learned how to make a basic Mekko Chart. In this part of the blog we are going to add in some totals, thankfully we can use some of our existing calculations to do this. The first is the Y Dimension (Colours) total. We are going to use quick table calcs to generate the percentage values. Don’t forget to hide the axis when you are done to maximise the useful space on the dashboard.
Rows: SUM(Sales) > Quick Table Calculation > Percent of Total Color: [Y Dimension] (sorted Ascending by sum of [Sales]) Text: As Rows
The next worksheet is going to be the totals bar at the bottom which uses many of the same fields. Please note there are 2 text fields used in this worksheet using Tableau’s ability to stack labels in the same cell. Columns: SUM(Sales) > Quick Table Calculation > Percent of Total Text: [X Dimension] (sorted Ascending by sum of [Sales]) Text: As Rows
Once that you have the totals in place all that remains is to arrange them on the dashboard.
The optional extra with this chart is to get around the data densification issues. This is only a problem with the X Axis as the Y Axis stacks naturally anyway. The following calculations use the Maximum X Axis running along the Y Dimension only.
[X Axis Complete] WINDOW_MAX([X Axis]) DTC > Compute Using: Y Dimension
[Label X Complete] IF MIN([Point])=3 THEN [X Axis Complete] – [X%]/2 END
To use these new calculations simply replace the [X Axis] and [Label X] fields from the previous blog (Part 4).
Another optional extra is to ensure that the charts disappear when the same parameter is selected on both axis. Simply put the following field in to the filter box and filter on False only. [Are They The Same?] [Parameters].[Y Dimension]=[Parameters].[X Dimension]
I have expanded on this by telling the audience that they need to select some different options, I’m sure you can find innovative ways to do this.
I leave you to apply the chart to your own data, play with the formatting and enjoy this flexible chart type. I would like to thank Joe Mako for his work on Marimekko in Tableau and for his subsequent interest in my blog.