When you’re working with dates or numeric bins, Tableau only shows the values that are represented in your data. If your data does not contain the complete range of values, the missing values will not be shown. For example, your data may contain data for January through May and September through December. However, there was no data recorded for June, July, and August. If you create a line chart in Tableau, the missing months will not be shown. You can optionally show the missing months to make it clear that there was no data recorded during that time.
Note: You can replace missing values with a calculated field using the ZN[] function. See Number Functions for details.
Missing Values Hidden [Default]
By default, missing values in a date range or numeric bins are not shown.
Missing Values Shown
You can show the missing values to indicate incomplete data.
To show missing values in a range, right-click [control-click on Mac] the date or bin headers and select Show Missing Values.
Note: You can also perform calculations on missing values that are shown in the view. To do this, open the Analysis menu at the top, and then select Infer Properties from Missing Values. For an example of this, see Predictive Modeling with Generated Marks.
When you are working with fields that are not dates or numeric bins, Tableau hides missing values by default. For example, you may be showing workers and the number of hours worked in a particular month. If a worker didn't work at all that month, there may not be a row in the database for that worker. When you drag the Worker field to the Rows shelf, the workers that didn't work are hidden by default. You can show the empty rows by selecting Analysis > Table Layout > Show Empty Rows. Similarly, show the empty columns by selecting Analysis > Table Layout > Show Empty Columns.
Empty Rows Hidden [default] Bob did not work in January so there are no records in the database for him. By default he is not listed. | Empty Rows Shown Even though Bob did not work in January, he is listed but no marks are drawn. | |
| |
Use pie charts to show proportions of a whole.
The basic building blocks for a pie chart are as follows:
Mark type: | Pie |
Color: | Dimension |
Angle: | Measure |
To create a pie chart view that shows how different product categories contribute to total sales, follow these steps:
- Connect to the Sample - Superstore data source.
- Drag the Sales measure to Columns and drag the Sub-Category dimension to Rows.
- Click Show Me on the toolbar, then select the pie chart type. Pie charts require at least one or more dimensions and one or two measures. Aggregate fields, such as Profit Ratio, don't contribute to those requirements.
- Add labels by dragging the Sub-Category dimension from the Data pane to Label on the Marks card.
Tableau aggregates the Sales measure as a sum. By default, Tableau displays a bar chart.
The result is a rather small pie. To make the chart bigger, hold down Ctrl + Shift [hold down ñ + z on a Mac] and press B several times.
If you don't see labels, press Ctrl + Shift + B [press ñ + z + B on a Mac] to make sure most of the individual labels are visible.
You can make a pie chart interactive in a dashboard. For more information, see Actions and Dashboards.
Note: Pie charts can also be used as a mark type in a visualization. For more information, see Pie mark.
Check your work! Watch steps 1-4: