Displaying multiple Charts in one Worksheet – The Trellis Chart

by Frederik Egervari

Trellis Charts are used to display multiple charts on one worksheet. They are great to get a quick overview. For example, you could build charts for individual countries, categories, etc. An example is shown in Fig. 1.

Figure 1: Trellis Chart of the individual subcategories of the superstore dataset.

To build this Chart you need to create the division into rows and columns manually. Two Calculations are needed (Fig.2). The “Columns Parameter” is an integer parameter and defines how many columns are shown but can of course be also replaced with a predefined number.

Figure 2: Calculation to divide into rows and columns.

Place the dimension you want to split by onto the details shelf. Then the “Columns” and “Rows” fields need to be placed on Columns and Rows and the computation of the index needs to be computed by the chosen dimension.

Place the Measures you want to display and you end up with the chart.

One more thing a Trellis Chart requires, and has to be done in a complicated way, is a label. To create this you need a secondary axis. Therefore you should create an additional calculated field (Fig. 3).

Figure 3: Calculated Field to generate the Label for each Chart.:

Here the SIZE()-function is used to return the number of rows in the partition and is used to identify the charts that need to be labeled. Then the Label is defined to be at a certain height, here you can use a Fixed LOD to define a value relative to the measure and manually adjust the height of the label.

The Label Marks Card needs to be put on “Text” and has to be used as a dual-axis. The label should be computed using the x-axis measure.

Figure 4: Finalized Trellis Chart

This blog post was inspired by a Workout Wednesday Challenge. Feel free to check it out and also take a look at the calculated fields on Tableau Public if you get stuck.

Sun 10 Sep 2023

Sat 24 Dec 2022

4 mins read

Wed 31 Aug 2022