Give a chestnut! Tableau Tips (91): Learn to Make Mosaic Charts Marimekko Chart

published: 2021-08-23

About Marimekko diagram:The Marimekko diagram is a business chart that helps strategic planners and decision makers consider it all, also known as market maps or widened bar charts. It can represent three levels of data (such as competitors, sales by market segment) in a single, two-dimensional chart, because of its ability to visually and graphically represent complex data and concepts. Widely used in conference reporting.

Marimekko charts are also referred to as mosaics, matrix maps, stacked rotation maps, spine maps, Olympic or submarine maps, Mondrian maps, or simply mekko maps.

And there are many ways to define this chart type:

- Combination of 100% stacked column chart and 100% stacked horizontal bar chart, each column using different variables

- Variable width stacked column chart

- A method of displaying the partial relationship of two variables to the overall relationship

- A method of displaying the frequency of a contingency table, where the area of each displayed cell is proportional to the whole

Let's look at an example of a Marimekko chart (below), an analysis of the world's largest asset management companies: It's not hard to find that most of the world's largest asset management companies are concentrated in the northeastern United States. Of the 14 companies that manage 1t and above, 8 are located in New York, Boston or Philadelphia.

So how do you implement Marimekko charts in Tableau? Let's learn together!

In this issue of "Give a Chestnut", Ada's Tableau technique to share with everyone is: Learn to make a mosaic chart Marimekko Chart.

For the convenience of learning, we use the supermarket data source that comes with Tableau.

Specific steps are as follows:

1, connect to the data source

Connect to the Global Supermarket Order data source; select Data Extract and create a new Worksheet.

2, set the filterAnd metrics

Go to the worksheet interface and drag the dimension "Country" to the filter. In the pop-up edit filter, select "Country" as "China".

Drag the dimension "province" to "row", click on the small triangle on the right side of the province capsule, and select "Filter".

In the province filter, arbitrarily select five provinces;

Drag "Product Type" to "Line", click on the small triangle on the right side of the capsule and select "Filter". Choose "office supplies" and "technical products" (optional 2);

Drag Metrics to Text in the Marks area and drag the Metric Name to the Columns area;

Drag Sales to the Measured area, click the small triangle to the right of the capsule, and select Total Percent for Quick Table Calculation.

Click on the small triangle on the right side of the sales capsule again, select "Add Table Calculation" and select "Specific Dimensions".

Next, drag Sales to the Measures area.

3, create a calculated field

In the box below the measure sales, enter: {EXCLUDE [product type]: SUM ([sales])}, then press Enter, we see "#Sales" appear in the list of measures on the left.

Click on the small triangle to the right of "#Sales" and select "Create" - "Calculate Fields". Let's create the calculated field "#Sales":

IF FIRST()== 0 THEN

MIN({ EXCLUDE [product type]: SUM([sales])})

ELSEIF MIN ([Province])!= LOOKUP(MIN([Province)), - 1) THEN

PREVIOUS_VALUE(0)+ MIN({ EXCLUDE [product type]: SUM([sales])})

ELSEIF MIN ([order date])!= LOOKUP(MIN([order date]), -1) THEN

PREVIOUS_VALUE(0)+ MIN({ EXCLUDE [product type]: SUM([sales])})

ELSE

PREVIOUS_VALUE(0)

END

Drag # Sales to the metric, then right-click # , select "Edit Table Calculation", select "Specific Dimensions" in the calculation basis, and only check "Province".

4, create a chart

Next, remove the "metric name" of the "column" area, and "drag" the province of the "row" area to the "regional" details ";

Drag the Product Type of the "Line" area to the "Details" of the "Marker" area;

Drag the calculated field "#Sales" in the metric to the "Column" area;

Drag the total percentage of "Sales" to the "Row" area (with a triangle).

At this point, the worksheet presents the following scatter plot;

Select "Bar Chart" in "Mark";

The chart becomes like this:

5, edit the label

Then drag the "{EXCLUDE[product type]:SUM([sales])}" field in the "Measures" to the "size" in the tag;

Select "Fixed" in "Size" - "Right";

Change the "Details" of "Product Type" to "Color" so that the Marimekko chart is ready and can be modified according to your actual needs.

Today's Tableau trick, are you getting it?Open your Tableau and try it out!