Professional Documents
Culture Documents
Text tables (also called cross-tabs or Pivot Tables) provide an easy way to display the numbers
associated with categorical data. In Tableau, you typically create a text table by placing a
dimension as the innermost field on both the Rows and the Columns shelf. Given this
description, a typical text table will use only dimensions for the rows and columns of a table. You
then complete the view by placing a field (usually a measure) on the Text shelf.
A text table uses the text mark type. Tableau can automatically select this mark type if the view is
constructed using only dimensions as shown below, and the Mark menu is set to Automatic.
Alternatively, you can manually select Text from the Mark menu for any data view. Refer to
Text Mark for information about this mark type.
The following examples show you how to use text tables to explore your data:
Text TableBasic
Text TableFilter and Color Encode
Duplicate as Crosstab
Text TableBasic
This view displays profit by product category, year, and region, in a text table.
You can create this view by following these steps.
1
Place the Sales dimension on the Text target on the Marks card.
The measure is automatically aggregated as a sum.
Tableau automatically selects the mark type as text and the mark color as black. Each cell in the
table displays the sum of the sales for a particular year and category.
The data show, for example, that office machines had the highest sales in every year but one.
Suppose that instead of displaying the raw numbers, you want to display:
When your data are displayed in a text table, these things are easy to do.
1
To display grand totals, from the Analysis menu choose Totals > Show Row Grand Totals
and then Totals > Show Row Grand Totals.
Each data cell reflects the percentage of the entire table. For example, computer
peripherals in 2010 accounted for 1.04% of the total sales across all years and all
products.
The grand totals for rows are the bottom-most row in the table. Each cell reflects the
percent contribution for a given year. For example, 2010 contributed 20.19% of the total
sales across all years and all products.
The grand totals for columns are in the right-most column in the table. Each cell reflects
the percent contribution for a given product. For example, we can see that envelopes
accounted for 1.26% of the total sales across all years.
See Percentages for more information about displaying percentages. And see Grand Totals for
information on turning on and configuring grand totals.
Filter by Profit.
Place the Profit measure on the Filters shelf and filter the data so that every row with
negative profits is excluded from the view.
The data show the sales for all products excluding rows with negative profits. Note that Rubber
Bands only had rows with positive profits in 2009, the other negative values are excluded from
the view.
Duplicate as Crosstab
The view shown below was generated as a crosstab from the bar chart example Bar ChartColorEncoded. Additionally, the rows and columns were swapped.
You can duplicate any view as a crosstab by selecting Worksheet > Duplicate as Crosstab. The
result will contain only dimensions in the Rows and Columns shelves. If measures are part of the
original view, the measure names will be displayed in the crosstab using the Measure Names
field. Views that are disaggregated cannot be duplicated as a crosstab.
Notice that the fields Measure Names and Measure Values appear on the Columns shelf and the
Text shelf, respectively. These fields were automatically included by Tableau so that the headers
and text values are included for the Profit and Sales measures.