Tableau Crosstab Chart
A crosstab chart is also called a Text table that shows the data in textual form.
The crosstab chart takes one or more dimensions and one or more measures. This chart can also show different calculations on the values of the measures field such as percentage total, running total, etc.
For example, consider a data source such as Sample-Superstore, if you want to find the number of Sale for each Segment in each Region. To display the data for each year using the available Order Dates below are some steps to create a crosstab chart.
Step1: Drag the dimension Order Date into the columns shelf.
Step2: Also, drag the dimensions Region and Segment into the row shelf.
Step3: Drag the measure Sales into the "Labels" shelf under the Marks pane.
The below screenshot shows the crosstab chart.
In the crosstab chart, you can get the values color encoded by dropping the Sales field into the Color shelf.
The color-coding shows the strength of the color depending on the value of the measure. The highest values have a darker shade of color, and the smaller values have a lighter shade of color, as shown in the below screenshot.
Also, in addition to the color encoding, you can get calculations applied to the values from the measure.
For example, you can apply the calculation to find the percentage total of sales in each row instead of only the Sales field.
1. Right-click on the Sales field in the Marks shelf.
2. And choose the Add Table Calculation option.
3. It opens the Table Calculation window.
4. Then, choose the "Percent of Total" option as Calculation Type and "Table (Across)" option as Compute Using.
After completing the above steps, you get the crosstab chart created with percentage values, as shown in the below screenshot.