Tableau Your Data!. Murray Daniel G.
Чтение книги онлайн.
Читать онлайн книгу Tableau Your Data! - Murray Daniel G. страница 10
To change the default aggregation, right-click any numeric field and change its default by selecting the menu option (default properties/aggregation). You can also change the aggregation of a field for a specific use in a worksheet. When the term “pill” is used in this context, it means that a field that has been placed on a view card, the Rows Shelf, or a Columns Shelf. In other words, the field is being actively used in the sheet.
Figure 1-12 provides an example. By right-clicking the SUM (Sales) pill on the columns shelf and selecting the Measure (SUM) menu option, you can select any of the aggregations highlighted.
Figure 1-12: Changing aggregation
The data source used in Figure 1-12 is a data extract of an Access database called Coffee Chain. In Tableau Desktop versions before V9, if you are working with Excel, Access, or a text file source and you don’t see the full range of expected options, run a data extract and you’ll see that more aggregation options will become available. In Tableau Desktop V9, running an extract to get more aggregation types is not necessary. You will learn about aggregation in Chapter 4.
A Word About Dimension and Attribute
Most aggregates involve mathematical concepts that should be comprehensible if you don’t have a statistics degree. Even if you don’t understand specifically what standard deviation is, you probably appreciate that it has something to do with variation of data within a set of numbers.
The attribute aggregate (ATTR) type is best understood by looking at examples of it in use. Refer to Chapter 7 and Appendix E for examples.
Building Visualizations with the Row and Column Shelves
Row and column shelves are used to express data on the vertical and horizontal axes in the view. Dimensions and measures can be displayed in any order and on either shelf. Figure 1-13 is a basic time series chart that shows sales trends by year and then quarter.
Figure 1-13: Time series by year, quarter
The time series has breaks in the line because time is discretely broken down by year and then quarter. Figure 1-14 displays the same data, rearranging time by showing quarter first and then year, making it easier to see how sales changed in each quarter.
Figure 1-14: Time series by quarter, year
Dragging the year field (pill) to the right of the quarter pill on the Columns shelf altered the context of the view making it easier to see how sales changed in each quarter over time.
Number of Records, Measure Values, and Measure Names
Tableau automatically adds three fields to every dataset:
• Number of records
• Measure names
• Measure values
Number of records is a calculated value that sums the number of rows in the data source. As mentioned earlier, field icons preceded by an equal sign are calculated values. Measure Names and Measure Values are special fields that allow you to display multiple measures on a single axis. Figure 1-15 was created by double-clicking the Measure Names field and clicking the Swap icon on the toolbar to change the orientation of the chart.
Figure 1-15: Measure Names, Measure Values
When the Measure Values field is used in a view, a new shelf appears that holds the pills for every measure in the dataset. Selecting Measure Names and Measure Values will automatically display all of the measures in your data source with their corresponding descriptions. You can use the Measure Names pill to filter out specific measures by right-clicking in the pill and de-selecting measures you no longer want to display on the axis.
Understanding Color in Icons and Pills
Have you noticed the color of the pills placed on shelves is either green or blue? Look at Figures 1-13 and 1-14 again. Can you guess what those colors mean? Most people think blue pills are dimensions and green pills are measures. That is a good guess, but the right answer is more subtle. Figure 1-16 displays the time series without any breaks between the years. Notice that there is only one pill on the Column Shelf and it is green.
Figure 1-16: Time series with continuous date
Green denotes continuous and blue measures discrete. When a time dimension pill is green, the data is displayed using an unbroken, continuous line. In Figures 1-13 and 1-14, the time dimension pills are blue. Time buckets are displayed discretely by year and then quarter. Measures aren’t always continuous either. Histograms convert normally continuous measures into discrete dimensions by making a new, discrete bin field from a measure. You’ll see an example of a histogram in Chapter 3.
Using the View Cards Filter and Highlight Data
The View Card area to the right of the data window in Figure 1-8 is used to apply filters in your sheet and to define the use of color, shape, size, and other visual means to convey information in your visualization. Fields placed on the Pages shelf create an auto-scrolling filter. Fields placed on the Filter shelf create manual filters. Let’s focus on the Marks card area first.
The Marks Card Properties
The drop-down selector at the top of the Marks area is used to select the mark type for display. By default, it is defined as Automatic. In this mode, Tableau Desktop will pick the mark type used. You can override that selection by picking any of the available mark types that Tableau supports.
You can use different visual tools to convey meaning in your visualization by placing fields on the desired Marks button. Note that when you hover your mouse over the buttons, additional information will appear:
• Automatic: By default, Tableau will supply an appropriate mark type but you can change the mark type used to display the measure by selecting the drop-down menu.
• Color: This expresses discrete or continuous values.
• Size: This expresses discrete or continuous values.
• Label: One or more fields can be expressed as mark labels.
• Detail: This disaggregates the marks plotted when dimensions are used and makes the field available in Tooltips.
• ToolTip: This makes fields available to ToolTips without disaggregating data.
• Shape: This expresses discrete or continuous values.