How to Create a Table in Tableau

Recently, I was creating a sales report using Tableau. In this report, I needed a simple way to compare Sales, Profit, and Quantity across different product categories.

Using a bar chart, it was possible to show the trends, but I would like to display the data with the dimension name and measure values, similar to an Excel sheet.

In Tableau, we have a built-in Text table, also known as a Crosstab. In this text table, we can display the data in a headers and columns format similar to an Excel sheet. To enhance the table view, I also used a highlighted table to display sales values in color shades.

In this Tableau tutorial, I will explain how to create a table in Tableau using the Text Table feature, and then we will also use the highlighted table to color-code the table’s blocks.

Tables in Tableau

In Tableau, tables are the simplest way to view and display data in worksheets. They arrange information into rows and columns, making it easy to read exact values or compare them. In Tableau, we have two types of tablesText Tables and Highlight Tables.

Text Tables: In Tableau, a text table is similar to an Excel sheet, displaying data in rows and columns with exact numbers. We can use the text tables when we have to display detailed figures, such as Sales, Profit, and Quantity by Category and Sub-Category.

Highlight Tables: The highlight tables are the enhanced version of the text tables. In this, a text table is displayed with added color. In this format, Tableau shades the cells in the table based on their values, like darker or brighter colors mean higher or lower values.

Create a Text Table in Tableau

In this example, we will use the Tableau Superstore dataset to create a text table that displays the values of ProfitSales, and Quantity for the product Subcategory.

Connect the Tableau with the Superstore dataset, and follow the steps below to create a text table.

  1. Drag the dimensions, such as Category and Sub-Category, to the Rows.
Create a Text table in Tableau
  1. To show the measures Sales, Profit, and Quantity in the table, add the Measure Names to the Filters section. Then select the measures and click OK.
Create a table in Tableau
  1. To display the values of the selected measure names, drag the Measure values to the Text card in the Marks section.
Add measures in Tableau text table
  1. If the data is not displayed in the table format, then ensure that you have selected the Marks type as Text.
Tableau text Table
  1. To show the total of the measure values, click on the Analysis -> Totals -> Show Column Grand Totals.
Show totals in tableau Table
  1. For better table formatting, we can also add lines to divide columns and rows. For this, right-click on the table and select Format. Then, in the Format pane, select Border icon -> Columns -> Column Divider -> Pane -> select line pattern.
Add lines in Tableau Text table

This way, we can create and format a text table in Tableau by following the above steps.

Create a Highlight Table in Tableau

In Tableau, a highlight table is similar to a text table, but with color shading applied to the table cells, to show patterns such as sales and profit.

In this example, I will use the same text table that we created in the above example.

  1. To create the chart, follow the same initial steps as above to build a Text Table with Category and Sub-Category on Rows, and a Measures Values on Text.
Create Highlight table in Tableau
  1. Now, drag the same Measure values again to the Color card on the Marks card.
Add Highlight cells in tableau table

With this, the measure values will be in shaded colors, with higher sales in dark blue and lower sales in lighter shades.

  1. To add color to the table cells, change the Marks type to Square. Now, we will see the table cells in color shades.
How to highlight cells in Tableau Table
  1. To change the color, click on the Color card in Marks and select Edit colors.
Add Colors in Tableau Table
  1. In the Edit color window, you can select other color shades from the Palette. In this example, I have chosen a Red-Green diverging scale, which will display negative values in red and positive values in green color shades.
Edit colors in Tableau Table

Now, we can see the table cells colored according to the selected color palette.

Tableau highlight table

This way, we can create a highlight table in Tableau by following the steps above.

Conclusion

In this Tableau tutorial, we have learned how to create tables in Tableau using both Text Tables and Highlight Tables. Using a text table is suitable when you need to show exact values in rows and columns, similar to an Excel sheet.

The highlight table takes the same data and adds color shading to spot trends and patterns in the table data.

By using the two table formats discussed in the above examples, you can present data clearly with exact numbers to facilitate value comparisons.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.