Text Table

Embed Size (px)

DESCRIPTION

fwfsf

Citation preview

Text TableText 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 TableBasicThis view displays profit by product category, year, and region, in a text table.You can create this view by following these steps. 1. Connect to the Sample - Superstore - English (Extract) data source. 1. Place the Order Date dimension on the Columns shelf.The date is automatically aggregated by year, and column headers are created with labels given by the dimension member names.1. Place the Category dimension on the Rows shelf.Row headers are created with labels given by the dimension member names.1. Place the Sales dimension on the Text target on the Marks card.The measure is automatically aggregated as a sum.The resulting view is shown below.

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: 1. The percentage in each cell with respect to the entire table.1. The grand totals for the rows and columns.When your data are displayed in a text table, these things are easy to do. 1. To display percentages, select one of the percentage options on the Analysis menu:Percentage of, and then, for our scenario, Table. 1. To display grand totals, from the Analysis menu choose Totals > Show Row Grand Totals and then Totals > Show Row Grand Totals.The resulting view is shown below.

Here's what this view shows:1. 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.1. 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.1. 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.Text TableFilter and Color EncodeThis view is a text table that displays the profit as a function of product category, year, and region. Additionally, the data are color encoded by product category and filtered to exclude negative profits.You can create the view with the following procedure. 1. Place the Order Date dimension on the Columns shelf.The date is automatically aggregated by year, and headers are created with labels given by the dimension member names.1. Place the Product 2 - Sub-Category dimension on the Rows shelf.Row headers are created with labels given by the dimension member names.1. Place the Sales measure on the Text shelf.The measure is automatically aggregated as a summation.1. Place the Product 1 - Category dimension on the Color shelf.Placing a dimension on the Color shelf separates the marks according to the members in the dimension, and assigns a unique color to each member. The color legend displays each member name and its associated color.1. 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 view is shown below.

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 CrosstabThe view shown below was generated as a crosstab from the bar chart example Bar ChartColor-Encoded. 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.