# Trellis Chart: How to analyze dimensions with a big number of values in Tableau – Skill Pill Video

As usual, our every Friday posts are meant to help us identify the right analysis and graphs to represent our data in Tableau Software. Data variety, as well as the amount of valuable information hidden in it, can sometimes seem difficult to explore. The reason why Tableau is the most powerful tool for data analytics and visualization is because it provides end users with multiple types of graphs and analyzes that are easy to follow and to understand. Today we will discuss about Trellis Chart, and situations in which it is preferable to use it. At the end we will show you the steps you have to go through to build this type of chart.

Trellis Chart is often known as “Small Multiples”. The name Small Multiples comes from the fact that this type of analysis is represented by a group of graphs or small charts displayed in the same view. Small Multiples or Trellis Chart is actually a series of small charts along a grid. But what are the situations in which we choose to build it?

#### When do we need a Trellis Chart?

Trellis Chart is used when we have in our data dimensions with many values. These dimensions can be for example countries, states, regions, categories, or sub-categories. If we want to analyze the value of measures that refer to such dimensions, Trellis Chart is the best option. What this type of analysis does is to group the dimensions into small graphs, each with its own information. Basically, Trellis Chart or Small Multiples organizes data in small spaces so that the information regarding each dimension can be easily navigated, in a single graph.

Why choose Trellis Chart to represent dimensions with many values? Because it is the best way to easily visualize each dimension and its associated measures. Also, Trellis Chart is a very good option to observe trends in our data and to quickly identify certain patterns. These small graphs share the same axes and scales, turning the final view into a size comparison.

By choosing Trellis Chart we will provide context for our analysis and a starting point for advanced discussions regarding business perspectives extracted from data. To build a Trellis Chart or Small Multiples analysis, please follow the steps below:

#### Step 1: Connect to data

→ In Tableau Desktop, connect to World Indicators – dataset provided by  Tableau.

#### Step 2: Create the visualization

→ Add Region on Filters and select Europe. Add to context this filter, because we will use multiple LOD calculations

→ Create a calculated field named Size with the formula:
Sum({COUNTD([Country/Region])})

→ Create 2 calculated fields named:
Columns: ABS(FIRST())%ROUND(SQRT([Size]))
Rows: INT(ABS(FIRST())/ROUND(SQRT([Size])))
Convert these 2 fields to Discrete

→ Add Columns to columns, Rows to rows

→ Add Country/Region and Year (Exact date, Discrete) to Detail

→ Edit Columns Table Calculation: Compute using by Specific Dimensions: Country/Region and Year, at the level Country/Region

→ Repeat the above steps for Rows

→ Add ATTR(Year) continuous to columns

→ Add sum of Health Exp % GDP to rows

→ Uncheck Show Header for Columns and Rows

→ Show mark labels for most recent per pane. Alignment – Middle Right

→ Create a calculated field: Date Reference Line – space for labels: DATEADD(‘year’,3,{MAX([Year])})
And add this date to the detail as ATTR Continuous

→ Add a reference line with Minimum of Date Reference Line. Label: None and Line: None

→ Create a calculated field named Health Exp % GDP – latest year with the formula:
IF {MAX([Year])}=[Year]
THEN [Health Exp % GDP]
ELSE 0
END

→ Sort Country/Region by this field Descending.

→ Create a calculated field for placing country labels:
Health Exp % GDP – for country labels:
WINDOW_MAX(SUM([Health Exp % GDP]))*1.5
Add this field on Rows. Compute using Country/Region and Year. Make dual axis. Synchronize it. Remove Measure Names from Marks. Uncheck Show Header for the right axis. Reduce opacity at 0% for the second mark.

→ Add Country/Region on label, line ends, uncheck label end of line. Alignment: Top Right

By Sergiu Rotaru