As a sales analyst, I analyzed the sales data in my company. In the data, I wanted to compare monthly sales trends for different product sub-categories across five years.
To visualize this data, I created a trellis chart in Tableau for an easy data comparison. In this chart, each panel in the grid represents a specific sub-category and shows its sales performance over time.
In this Tableau tutorial, I will explain the Trellis chart in Tableau and how to use it to visualize the data comparison.
What is a Trellis Chart in Tableau?
In Tableau, a trellis chart is used to display multiple smaller charts or graphs that are arranged in a grid to compare different subsets of data. These smaller charts share the same scale and axes, so it’s easy to compare them side by side. With this data visualization, we can spot patterns, trends, and differences between the grouped data.
Trellis charts are helpful when you want to visualize the same type of data information for different categories. With this, we can avoid showing all data in a single graph or chart, which would make it complex to understand.

Create a Trellis Chart in Tableau
To create the Tableau Trellis chart, we will use the Tableau Superstore dataset. Now, connect the data source with Tableau and follow the steps below to create the Trellis chart.
- To define the panel of the chart, create the calculated fields Rows and Columns using the formulas below. After this, right-click on the calculated field and change its type to discrete.
//Columns
(index()-1)%(round(sqrt(size())))
//Rows
int( (index()-1)/(round(sqrt(size()))))- Create a custom date field for Sub-category sales using the Order Date. Click on Order date, and select Create > Custom Date. In the custom date, enter the label as Month, for Details select Months, and click OK.

- To create the trellis chart view, add the calculated field Columns to Column and Rows to the Rows shelf. After this, add a custom date Month to the column and Sales to the rows. To represent sales by sub-category, add the sub-category to the details card.

- To configure the table calculations, click on the calculated field Column and select Edit Table Calculation. In the table calculation, select Specific Dimension and check Sub-Category and Month, then also Level as Sub-Category.

In the dimensions, ensure that the Sub-Category dimension is positioned above the Month field.
- Configure the table calculation of the Rows in the same way, and ensure the dimension is placed before the date field.

On the chart, we can see some uneven data lines and points. It is because of the empty values in the datasource. For example, a product hasn’t had sales in the initial month, so the sales values will be null in those months.

- To synchronize the data, press “Ctrl” and drag the custom date Month from the Column to the detail card in the Marks section. After this change, the type of Month in the Column to Attribute.

With this, lines in each section will show the sub-category sales data in continuous lines and a synchronized way.

- To add the label for sub-categories, change the Sub-Category in the Marks section from Detail to Label.
- For the alignment of label text, click on the Text card and select Line Ends >Label Start of Line. You can choose the position of the label in the Alignment as Top, Bottom, or Middle.

Finally, remove the labels in the columns. For this, right-click on the Columns in the chart and select Hide Field Labels for Columns.

To remove the headers from X and Y axes click on the axes and uncheck Show header. After this, the final output of the Trellis chart will be displayed as shown below.

In this Trellis chart, we can view the monthly sales trends over the years for each sub-category.
This way, we can create a Trellis chart in Tableau to visualize the data by displaying multiple smaller charts or graphs arranged in a grid to compare different subsets.
Conclusion
In this Tableau tutorial, we have learned about the Trellis chart and how to create one with the help of the above example. By creating a trellis chart in Tableau, we can break down large datasets into smaller, comparable datasets.
In this chart, by arranging multiple line charts in a grid format, we can easily spot trends, patterns, and differences across categories and regions.
You may like to read:
- Barbell Chart in Tableau
- Waffle Chart in Tableau
- Lollipop Chart in Tableau
- Candlestick Chart in Tableau
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.