0% found this document useful (0 votes)
119 views48 pages

Tableau Desktop Fundamental Tutorial 1: Connecting Data: Data Visualization and Business Intelligence

This document provides instructions for connecting to and working with data in Tableau. It discusses how to create live data connections in Tableau, save and edit data sources, share data sources on Tableau Server, understand how changes to underlying data affect visualizations, and modify data attributes like default properties and field types. The document also includes a practice exercise asking the reader to connect to a sample Excel data set, modify various field properties, save the data source, and test the connection.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views48 pages

Tableau Desktop Fundamental Tutorial 1: Connecting Data: Data Visualization and Business Intelligence

This document provides instructions for connecting to and working with data in Tableau. It discusses how to create live data connections in Tableau, save and edit data sources, share data sources on Tableau Server, understand how changes to underlying data affect visualizations, and modify data attributes like default properties and field types. The document also includes a practice exercise asking the reader to connect to a sample Excel data set, modify various field properties, save the data source, and test the connection.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 48

DATA VISUALIZATION AND BUSINESS INTELLIGENCE


 HOME
 ABOUT
 TUTORIAL

Tableau Desktop Fundamental Tutorial 1 :


Connecting Data
FEBRUARY 21, 2018

A. Creating a Live Data Connection

Tableau Desktop allows you to connection live to nearly any data source. During the
process of creating a data connection, you’ll use the Data Connection page.
The left side of page lists information about the data connection, including the data source
type and the tables within the data source.
The large white box in the upper area of the page shows the tables that are being used and
includes options for adjusting the join type and fields used, if any.
In the large area toward the bottom of the page, you can see a preview of the data being
used.
In the top right area, under connection, you can select whether to use a live connection or
an extract Tableau Desktop defaults to Live.
In the top right area, under Filters, you can choose to add filters to data source. 

1. To Create a Live Data Connection to a Single Table


1. Launch Tableau Desktop 
2. On the Tableau starts Page, click Connect to Data 
3. On the Connect to Data page, select the appropriate data option 
4. Do one of the following.  
5. Under Sheet, double-click the table you want to connect to, or click and drag it to the
white area labeled Drag sheets here.
6. Note that in the upper area of the windows toward the right, under Connection, Live
is automatically selected. 
7. Toward the middle of the Data Connection page, click Go to Worksheet

B. Saving and Editing a Data Source 

When you connect to a data source in Tableau, you can save data attributes (or metadata)
for the source. For example, if you move a field from Measures to Dimension or change a
field’s name or defaults properties, the change are saved in the data source even when the
underlying database or spreadsheet is updated.
Save data source can also include parameters, calculated fields, groups, hierarchies, bins,
or sets you have created.

1. Create a Tableau Data Source (.tds) File 

Your data source is saved as a .tds file. This file does not contain data, but it does save the
data source with the modifications and the connection information you have added.
You can save the .tds file into two ways:

2. Modifying Data Attributes


You can modify some data attributes, save those modification to your data source, and
share that data source with other user.

a) Organize Dimension and Measures with Folders

1. In the Data window, right-click in the white space below the fields, and make sure the
Group by Folder option is selected. If not, select it.
2. In the Data window, right-click in the write space below the fields, and choose Create
Folder. 
3. In the Create Folder dialog box, name the folder. 
4. Drag and drop fields in the new folder. 
b) Change a Measure to Dimension, or, a Dimension to Measure 

1. In the Data windows, drag a Dimension field to a Measure, or drag a Measure to


Dimension. 
c) Set the Default Properties for Measure 

1. Right-click the Measure field you want to modify, and choose Default Properties. 
2. Choose one of the following: 
 Comment 
 Color 
 Number Format 
 Aggregation 
 Totals 
3. Change the properties according to available option. 
d) Set the Default Properties for a Dimension

1. Right-click the Dimension field you want to modify, and choose Default Properties.
2.  Choose one of the following:
 Comment
 Aliases
 Color
 Shape
 Short
3. Change the properties according to available options. 
C. Sharing a Data Source 

If you have Tableau Server, you can share a data source connection (.tds file) with other
users.

1. On the Data menu, select the data source you want to share, and choose Publish to
Server. 
2. Name the data source 
3. Close the existing file and open a new workbook
4. Open a new workbook and connect to the Shared Data Connection you just created. 
5. Do one of the following:

D. Understanding Change to Data

When the underlying data for your visualization change, your visualization may be affected
in different ways depending on how you connect to the data in Tableau and depending on
what changes are taking place in the underlying data.
1. Effect of Data Connection Type 

If you using a live data connection, changes to the underlying data will be reflected in your
visualization when you open the visualization or refresh the data connection in a
visualization that is already open. However, if you are using a Tableau extract, changes
made to the underlying data are not reflected in the visualization until you refresh the
extract.

     a) To Refresh a Data Connection


         Right-click the data connections in the Data Window and click Refresh.

2. Effect of data Change Type 

In order to affect the visualization, the changes to the underlying data must have affected
fields that are used in the visualization. Changes to other fields won’t affect the
visualization.
If the changes to the underlying data only change the values in the data, then those
changes will be reflected in the values that are displayed in your visualization.
However, if the changes to the underlying data change the structure of your data, such as
removing orremaining a field, the visualization will break if the changed fields were included
in the virtualization.
For examples, in the following graphic, you will see the result of changing the name of the
field “Country/Region” to “Country” in the underlying data. The field that can no longer be
found is shown in red where it is used (Filter in this case) and with an exclamation point in
the Data Window. The visualization is “Grayed” out and cannot be interacted with until the
offering field is fixed or removed. Also notice that the new field name is included in the Data
Window
If you make one of these type of changes in your underlying data, but the modified field was
not used in the visualization, the Data Window will be updated with the change and there
will be no effect on the visualization.

E. More Data Connection Option


F. Practice: Creating a Local Data Connection 

Download this workbook file Creating_a_Local_Data_Connection_Starter.twbx and Create


a data connection according to the following specification: 
 Connect to the Superstore Sales Tarining.xls file (Download Here)
 Connect to the Orders table of the data source 
 Order and Row field are Dimensions. 
 NOTE : Although Tableau normally puts fields containing numbers in Measures,
Tableau recognized that the Customer_ID field from the original excel file should
be a Dimension because of the “_ID” at the end. Tableau also clened up the field
name so it displays as
Customer ID.

 Sales and profit fields are formatted as currency. 


 The discount field uses the Average aggregate function, has a defaut format of
percentage, and includes a comment: “Average Discount Percentage”. 
 Data Source is saved to the Tableau Repository as “My Superstore”

1. Direction Details 
a. Connect to the Orders table in the Superstore Sales Training.xls data source
(Download Here). 
b. In the Data window, change the Order and Row fields to Dimensions. 
c. Change the Default Properties of both Profit and Sales fields to Currency with 0
decimal places. 
d. Change the Default Properties of te Discount field to use the Average aggregation,
and use percentage with two (2) decimal places. 
e. Edit the comment for Discount Field to read “Average Discount Percentage”. 
f. Add Orders (Superstore Sales Training.xls) to Saved Data Sources. 
g. Name the data source “My Superstore” and ensure it is saved in the My Tableau
Repository folder, in the Data sources folder.
h. Close the current workbook, and then open a new workbook. Under “Connect to
Data” select the new “My Superstore” data source, and observe the fields that were saved.
2. Solution
a) Create the connection and modify the field setting 
 Open the Creating_a_Local_Data_Connection_Starter.twbx and connect to the
Superstore Sales Training.xls data source. 
 Double-click the Orders table, and then click Go to Worksheet. 
 In the Data window, drag the Order and Row fields from Measures to Dimension. 
 Right-click the Profit field in the Dta window, select Default Properties, and choose
Number Format. 
 On the Default Number Format screen, select Currency (custom), set decimal place
to ) (zero), and click OK. 
 Repeat steps 4 and 5 for the Sales field.
 Right-click on Discount, select Default Properties, and for Aggregation, chose
Average. 
 Right-click on Discount again, selects Default Properties and choose Number
format. 
 On the Default Number Format screen, select Percentage, make sure Decimal place
is set to 2 (two) and click OK. 
 Right-click on Discount agatin, choose Default Properties, and edit Comment to read
“Average Discount Percentage”. 
b) Save the data source and test the connection 
 In the Data window, right-click Orders (superstore Sales Trainig.xls), and then click
Add to Saved Data Source. 
 Name the data source “My Superstore”, and save it in My Tableau
Repository/Datasources. 
 Save and close your current workbook. 
 Open new workbook, and in the upper right corner of the screen, click the workspace
control house icon that represent the start page. 
 On the start page, under Save data source, select the new “My Superstore” data
source, and observe the fields that were saved. 
 Add to Phrasebook
o No wordlists for English -> Indonesian...
o Create a new wordlist...
 Copy
 Add to Phrasebook
o No wordlists for English -> Indonesian...
o Create a new wordlist...
 Copy
TABLEAU
Tableau Desktop Fundamental Tutorial 2 :
Creating Basic Visualization
FEBRUARY 25, 2018

A. Getting Started In Tableau Desktop

1. Data Window Components

The Data window contain lists of fields (dimensions and measures), and other items such
as calculations, parameters, and sets used to create view.
2. View Components

The view is the workspace for creating visualization. Drag items from the data window to the
view to create visualization.

B. Elements of a Visualization

When you connect to data, Tableau categorizes your data fields as Dimensions (discrete
categories of data) and Measures (numeric data values). When you drag a dimension or
measure into a view, the Tableau visualization transforms you data into Marks, which are
the visual form your data takes. Marks cane bars, lines, dots, shapes, or numbers and text.

1. Create a Visualization

Two ways to create a basic visualization:

 NOTE : This course concentrates on building your own.

2. Change Colors, Size, or Mark Types

Use the marks card to change the attributes of marks in your view.

a) Select the mark you want to change in the view.


b) Do one of the following:
C. Practice: Exploring Tableau and the Data

Download this Exploring_tableau_Starter.twbx and create a view according to the following


specification:

 Shows Sales in a bar chart by Department and Category.


 Shows Profit using color. 
1. Direction Details

 Create the view by dragging the following elements from the Data windows to
specified location:

2.  Solution

 Download the packaged workbook name Exploring_tableau_Starter.twbx


 In the Data window, drag the Sales field from Measures to Columns.
 In the Data window, drag the Department field from Dimension to Rows.
 In the Data window, drag the Category field from Dimensions to Rows, placing it to
the right of Department field.
 In the Data window, drag Profit from Measures to Color on the Marks card.

DATA VISUALIZATION AND BUSINESS INTELLIGENCE


 HOME
 ABOUT
 TUTORIAL

Tableau Desktop Fundamental Tutorial 3:


Simplifying and Sorting Your Data
FEBRUARY 25, 2018

A.  Data Filtering


Using filters narrows the data shown in a view to focus on relevant information. Filter
options vary by field type (Dimension, Measure, Date Dimension). You can expose quick
filters for any dimension or measure in your data, and you can create custom filters on
dimensions or measures.
After you create a filter, all filtered fields display on the Filters shelf in the worksheet. Use
this to identify which data is included in or excluded from the view.
1. Filter on a Dimension

Use a dimension filter to see the data values for smaller set of dimension members.

The filter dialog box for dimension has four filter option tabs: General, Wildcard, Condition,
and Top. These filters are cumulative, meaning the settings you choose on each tab affect
the others using “AND” logic. For examples, if you filter the Region dimension to include
only West (on the General tab), and then add conditions for a Top 10 filter (On the Top tab),
you see Top
10 data for the West only.
a) Built a Filter by Dimension

 Drag a dimension to Filter


 In the Filter dialog box, set the filter criteria and click OK.

 
2. Filter on a Measure

Use measure filters to show only the values that meet your criteria. For examples, you could
apply filters foe sales that displays only the values above, below, or within a specified
range, like sales greater than $500,000, sales less than $500,000 and $2,000,000.

a) Build a Filter by Measure

 Drag the measure to the Filter shelf.


 In the Filter Field dialog box, select the method of aggregation for the measure, and
click next.
 In the Filter dialog box, set the filter criteria and click OK:
B. Practice: Filtering

Download this file Filtering_Starter.twbx and create a view according to the following


specification:

 Has a quick filter region, displays as a single value list, titled “Select a Region” with
the option to choose “All” disabled.
 Has a quick filter on Sum or Sales, formatted as a slider, and titled “Adjust View by
Sales”.

1. Direction Details

 Create a quick filter region, displayed as a single a value list, removing the All option,
and titled “Select a Region”.
 Create a quick filter from Sum of Sales, displayed as a slider, with a range of values
between $500,000 to $1,000,000, and titled “Adjust View by Sales”
 Experiment with the sliders and notice the “AND” logic being used. The results
shown are those that match the criteria of both filters.
2.  Solution
 Download this file Filtering_Starter.twbx
 Right click on Region in the Data window, and click Show Quick Filter
 On Region quick filter, click the drop down arrow, and choose Single Value (List).
 Click the drop down arrow again for the Region quick filter, select Customize, and
chooseShow “All” Value to cancel the selection if it is checked.
 Click the dropdown arrow again for the Region quick filter and choose Edit Title.
 Name the quick filter “Select Region” and then click OK to close the dialog box.
 Drag Sales form the Data window to the Filter shelf.
 Select Sum as the aggregation, and then click Next.
 Choose range of values for input, set $500,000 as the bottom and $1,000,000 as the
top, and click OK.
 Right click the SUM (Sales) filter, and choose Show Quick Filter.
 Click the drop down arrow for the SUM (Sales) quick filter, and choose Edit Title.
 Name the quick filter “adjust View by Sales”
 Experiment with the sliders and notice the “AND” logic being used. The results
shown are those that match the criteria of both filters.
C. Creating Date Filters

Use a date filter to filter a data subset for specific date or time criteria. You can filter date for
a specific range of dates or for a discrete date/time.

1. Add a date Filter to a View

 Drag the date field to the Filters shelf


 Select the type of date filter you want to use
See below for more information.

2. Set a Relative Date Filter

Use a relative data filter to update data dynamically with time. For example, set your filter to
show data for 3 months before or after the current date. The data shown in your view
updates daily.

 Select Relative date from the Filter Field dialog box and click Next
 On the Filter dialog box, choose the time unit you want to use for the relatives data
range.
 Next, set the specific time to target. For example, if you choose Quarters for your
unit of time, the options read Previous Quarter, This Quarter, and Next Quarter. You can
also specify Last N or next N quarters, or the current quarter to date.
 To set the filter to a specific anchor date, select Anchor relative to, and choose a
date from the menu.
3. Set a Range of Dates Filter

Use the range of dates filter to specify a span of time. You can also specify a starting or
ending date.

 Drag a date field Dimensions to the Filters shelf


 On the Filter dialog box, choose Range of dates
 Set the specific start and end dates to target. Use the slider, or select the dates from
the dropdown, menus, and click OK.
4. Set a Starting Date or Ending Date Filter

 Select Range of Dates from the Filter Field dialog box and click next
 On the Filter dialog box, choose Starting date or Ending date
 Set the start date or end date, and click OK.
5. Creating Other Data Filters

Using the same steps as above, you can create filters from discrete dates and times. After
you drag the date field to the Filters shelf:

 Choose the date part you want to use as filter on the filter Field dialog box, and click
Next.
 On the filter dialog, select the members you want to use as a filter. The list is based
in your selection in the first dialog box. For example, if you choose weekday, the days of the
week display.
 Click Ok.
6. Add a Quick Filter

After you create your date filter, add a quick filter so user can manipulate the data in the
view.

 Right click the field in the filter shelf, and choose Show Quick Filter. A filter displays
in the view.
 On the quick filter, click the drop down arrow and edit the appearance and function of
the filter as required.
D. Shorting

Tableau has multiple methods for shorting data in views, including computed shorts and
manual sorts.

1.   Computed Shorts

A computed sort sets the sort order and changes dynamically as the data changes. There
are several types of computed sorts.

a) The Use a Default Sort

 In the data window, right click the dimension to sort on


 On the context menu, select Default Properties, and choose short
 In the sort dialog box, choose Manual, and then use the Up and Down buttons to
manually sort the dimension member.
 Click OK. The sort order is part of the filed properties of the dimension, and can be
used across worksheets in the workbook.
b) To Use Right Click Sorting in a Dimension
In the view, right click the dimension to sort

 On the context menu choose Sort. The sort dialog box appears.
 Set the sort order (Ascending or Descending)
 Set the sort by option, and click OK
c) To Use One Click Sorting on an Axis

 On the toolbar, click either the Ascending or Descending sort icon. If you however, a
tooltip appears that describe how short will be performed (based on fields in the view, and
current view selections)

2.   Manual Sorts


Manual Shorts are an easy way to sort data quickly, but they are not dynamic.

a) To Use Drag and Drop Sorting

 On the view, select the headers or labels for the items you want to sort
 Drag the selected headers or labels to re order them
b) To Sort on Selected Marks

 On the view, select the marks for the dimension members you want to sort
 However  until  the tooltip displays,  and then  choose  either  sort  ascending or  sort
descending.

E. Practice: Sorting

Download this file Sorting_Starter.twbx and modify the view on Sheet 1 according to the


following specification:

1. View One

 Use a manual default sort for Department in this folder: Technology, Office Supplies,
and Furniture.
 Use a local sort in the view to order Category by SUM (Sales) in descending order.

2. View Two

 Duplicate of the first worksheet, with bar color encoded by Profit.


 Category sort edited to short by Profit in descending order.

3. Direction Details

 On the view one tab, create a manual default sort department, with values ordered
by Technology, office supplies, and then furniture.
 On the view two tabs, sort category by SUM (Sales) in descending order.
 On the view two tabs, edit the sort applied to category so field selected is sum of
profit.
4. Solution

a) View One

 Download this file Sorting_Starter.twbx


 Click the view one tab
 In the view, right click the department label, and choose sort.
 In the sort dialog box under sort by, choose manual.
 To set the sort order, drag and drop each field, or, select a field and use the Up and
Down buttons. Order them so Technology is first, then office supplies, and the furniture, and
then click OK to close the dialog box.
 However on the sales axis, and select the sort icon to toggle between ascending and
descending sort. Leave it as descending sort.
b) View Two

 Click the view two tab


 Right click the category label in the view, and choose sort
 In short by, select field, then choose profit with an aggregation of sum, and click OK.

DATA VISUALIZATION AND BUSINESS INTELLIGENCE



 HOME
 ABOUT
 TUTORIAL

Tableau Desktop Fundamental Tutorial 4:


Organizing Your Data
FEBRUARY 25, 2018

A. Using Group

A group is a set of dimensions numbers combined into higher level category. For example,
this
could be several smaller states grouped as “region”, or similar products grouped in a single
category.
Groups are useful for simplifying the display data when working with large numbers of
dimension
members.
Here are three methods to create a group:

1. Create a Group from the View

 CTRL+click to select several dimension labels in the view, and then click the Group
icon. You
can find the Group icon on the toolbar, within the tooltip, or with a right click. The new group
appears in the data window.
 If you want to add or remove group members, in the data window, right click the new
group, choose Edit group, and edit the members. 

2.  Create a Group from the Data Window

 Right click a dimension in the data window, and then select create group.
3. Create a Group Using Visual Grouping
 Select a group of marks in the view and click the Group icon in the tooltip. This
allows you to group on a single dimension. Using visual grouping allows you to show items
as members of group without losing their labels or individuality. If there are multiple
dimensions in the view, you can choose other dimensions in the view or All Dimensions 
 Note: You can also right click on the marks and select Group from the menu.
The new Group is placed on Color. Items not part of the group are designed as “Other”.

B. Creating and Using Hierarchies 

Data organized into hierarchies is common in database. An example of a hierarchical


structure is geographic data, with country at the top of the hierarchy, followed by Region,
State, and then Zip code.
In Tableau, dates automatically generate a hierarchy, which means users can drill up and
down
using the plus and minus signs.
Using tableau, you can manual generate a hierarchical structure in your data window from
any dimension. When you create dashboard using views containing hierarchies, user can
click a plus (+) sign and drill into the data to display more details based on the hierarchy you
created.

Here are two ways to build a hierarchy.

1. Build a Hierarchy Using Drag and Drop

 Drag and drop the child field onto parent field in the Data window. 
 (Optional) Name the hierarchy (for examples, “Product Line Hierarchy”)
  
2. Build a Hierarchy Using Context (Right-Click) Menu

 In the Data Window, CTRL-click to multi-select the fields to add to the hierarchy 
 Right click and choose Create Hierarchy 

 Note: Using right click puts fields in alphabetical order, not necessarily the
appropriate hierarchical order. You can re-order the field by dragging and
dropping them into place

C. Practice: Creating Groups and Hierarchies


 
Download this file Creating_Groups_and_Hierarchies_Starter.twbx and create a view
according to the following specification:

 Has a group named “Desk Supplies” that includes the following members:
Envelopes, Pens & Art Supplies, Scissors, Rulers and Trimmers, Labels, Rubber Bands 
 Hierarchy named Product with following dimensions in this order: Department
Category (Group), Category Item
 Category (group) is drilled down one level so it displays Category in the view. 
 1. Direction Details

 Create a Group from the following items in Category: Envelopes, pens & Art
Supplies, Scissors, Rulers and Trimmers, Labels and Rubber Bands.
 Category is replaced on Rows Shelf by Category (group), and a dimension titled
“Category (Group)” is added to the Dimensions area of the data window.
 In the view, rename the label for the new group: “Desk Supplies”
 Create a hierarchy called “Products” in the Data window Organized as follows:
Department, Category (group), category, items.
 In the view, drill down in the Category (group) to category.
2. Solution 

 Download this file Creating_Groups_and_Hierarchies_Starter.twbx


 SHIFT + click to select these items near the bottom of the vertical axis: Envelopes,
Pens, & Art Supplies, Scissors, Rulers and Trimmers, Labels, Rubber Bands.
 Right-click the selected items, and select Group
 In the view, right click the new group and click edit Alias
 Type Desk supplies as the name, and click OK
 Select and drag category (group) onto Department in the Data window to create a
hierarchy. In the Create hierarchy dialog box enter “Products” and click OK. 
 Click and drag category into the products hierarchy, placing it below Category
(Group).
 Click and drag item into the products hierarchy, placing it below category.
 On the rows shelf, click plus (+) next to category (group) to expand to Category.

D. Practice: Creating Visual Groupings

Download this file Creating_Visual_Grouping_Starter.twbx and create a view according to


the following specification:

 Has a visual group named “Desk Supplies” using the following Category: Envelopes,
Pens & Art Supplies, Scissors, Rules and Trimmers, Labels, and Rubber Bands. 
 Has a visual group named “Machines” with Office Machines, Copiers and Fax and
Computer Peripherals.
 All others are grouped as “Other”. 

1. Direction Details

 Select the bars for Envelopes, Pens & Art Supplies, Scissors, Rules and Trimmers,
Labels, and Rubber Bands, and create a group named “Desk Supplies” 
 Select the bars for Office Machines, Copiers and Fax and Computer Peripherals,
and create another group named “Machines” 
2. Solution 

 Download this file Creating_Visual_Grouping_Starter.twbx


 CTRL + click each of the following bars: Envelopes, Pens & Art Supplies, Scissors,
Rules and Trimmers, Labels, and Rubber Bands. TIP: Make sure to select the bars, not the
text. 
 With these items selected, right click and choose group. 
 CTRL + click to select the bars that represent each of the following: Office machines,
copiers and fax, and computer peripherals. TIP: Make sure to unselect the group you just
created. 
 With these items selected, right click and choose group 
 In dimension in the data window, right click category (group), and choose Edit
Group. 
 In the Edit Group dialog box select Envelopes, labels, Pens & Art Supplies and 2
more; click Rename; type “Desk Supplies” and press Enter. 
 In the Edit Group dialog box select Computer Peripherals, Copiers and Fax, Office
Machines; click Rename; type “Machines” and press ENTER. 
 Click OK
 All of the items not included in another group automatically included in a group named
other.

 Add to Phrasebook
o No wordlists for English -> English...
o Create a new wordlist...
 Copy
TABLEAU

DATA VISUALIZATION AND BUSINESS INTELLIGENCE



 HOME
 ABOUT
 TUTORIAL

Tableau Desktop Fundamental Tutorial 5: Slicing


Your Data By Date
MARCH 04, 2018

A. Working With Dates in Tableau

For relational data sources, Tableau automatically places dates and times in the
Dimensions area of the Data window. Date/time fields are identified by the date and time
icon as shown below.

 NOTE: Date hierarchies and attributes in OLAP (or cubes) are defined when the
cube is created and you cannot modify them in Tableau
When you place a date on a shelf, the field name automatically reflects the default date
level, defined as the highest level of multiple data instances. For example, if the data field
includes multiple years, the default level is year. However, if the date field contains data for
just one year but includes multiple months, then the default level is month.

1. Change a Date Level for a Date Field


 Drag a date field into the view on the Rows or Columns shelf.
 Click the drop-down arrow on the date field, and select the date/time level (year,
quarter, month, week, day, hour, and so forth).
B. Understanding and Using Discrete and Continuous Dates

Continuous dates represent the natural, chronological progression of time. When you add a
continuous date/time dimension to view, Tableau creates an axis as a time line. Use
continuous dates when you want to show your data organized along a timeline, from the
first data point in time to the last data point time.

In contrast, when a discrete date dimension is added to the view, Tableau organizes the
dates as discrete parts, independent of linear time. Use discrete dates to show your data
organized by date units, such as aggregated data for all Novembers over several years.

These different time behaviors create different views. If the date/time attributes of your view
do not seem right for your data, you might need ti change your date dimension to discrete or
continuous.

1. Change Date Dimension from Discrete to Continuous, and Continuous to Discrete.

To make a date dimension continuous by default:


 Right click the field in the data window and select Convert to Continuous. Note that
the field icon turns green and converts to a continuous field when added to a shelf.
To revert to discrete:
 Right click the field in the data window and select Convert to Discrete
To make a date dimension continuous in a view:
 Drag the date field to columns or rows.
 Click the dropdown menu, and choose the date unit you want to use from the
continuous date levels
C. Using Discrete Date Parts

You can move discrete date parts to different shelves or to a nonlinear order.

1. Reorder the Date Hierarchy

You can order discrete dates according to any hierarchy that produces the view you need.
The view below shows quarter before of order date, which allows a user to analyze
quarterly sales trends over years.
a) Change Hierarchical Order o Date Fields
 Drag a date field into the view to the Rows or Columns shelf.
 Drag a measure field (for example, sales) row.
 Click the plus (+) sign in the date field to expand the date hierarchy
 Drag field around on the rows/columns shelves to reorder the hierarchy. The
resulting view serves a different analytical purpose.
2. Different Date Parts on Different Shelves

You can also place different date parts on different shelves. In this view, the Year of Order
Date is on the Column shelf and the quarter of Order Date on the Row shelf.
a) Place date parts on different shelves
 Drag the discrete date field into the view, and click the plus (+) sign to drill down.
 Select one of the expanded date parts, and move it to a different shelf.
D. Practice: Discrete and Continuous Dates

1. Discrete Month View

From the Starter folder on your USB, open the package workbook named Using
Discrete_and_Continuous_Dates_Starter.twbx and use Sheet 1 to create a view according
to the following specification:
 Uses bars to show the aggregation of data by month.
2. Direction Details
 Create a view for Discrete Dates:

 Right click the order date on columns and select the discrete month format.
 Note that the plus sign on the date on columns allows you to drill down further into
discrete date and you can also use the minus sign to move back to less detailed levels of
detail.
Note that Tableau nests every new level in the hierarchy as a discrete dimension.

3. Continuous Month View

Use Sheet 2 of Using Discrete_and_Continuous_Dates_Starter.twbx to create a view


according to the following specification:
 Dates are shown in a continuous time line at the month level.
 Drag sales to rows and order date to columns
 Format the order date on columns as continuous month
NOTE: The field for (Order Date) is now green, indicating it is continuous, and the axis is
converted to continuous. While it is possible to change from discrete to continuous in the
right click menu, that method will not enable the drill options needed below.
 On the order date field, use the plus sign to drill down to lower level of detail. Then
use the right click menu return to continuous month.
NOTE: The differences between a discrete and a continuous dill: Tableau replaces the
previous continuous date value with the new one, and there is no option to drill back up to
higher levels (“-“). However, you can choose a higher date level from the context
menu.

5. Solution

a) Discrete Months View


 Download this file Discrete_and_Continuous_Dates_Starter.twbx
 Verify that sheet 1 is selected.
 From measures in the Data window, drag sales to row.
 From dimensions in the Date window, drag Order Date to Columns.
 On the Columns shelf, right click the order date field and select the discrete month
format (May), as shown below.

 On the Marks card, click the mark type deop down list ad change it from automatic to
bar.
b) Continuous Month View
 Select Sheet 2
 From measures in the data window, drag sales to rows.
 From dimensions in the date window, drag Order Date to columns
 On the Columns shelf, right click the order date fields and select the continuous
month format (may 2011), as shown below.

E. Defining a Fiscal Year


You can change the default properties of a date/time field to display according to your
organization’s fiscal date equivalent. For instance, calendar year always run from January
1st until December 31st. However, a company’s fiscal year might run from July 1st in one
year through June 30th of the following year. The start of the fiscal year has to be the first of
the month.

1. Define a Date by Fiscal Year


 Right click the date dimension in the data window, select Default Properties, and
choose Fiscal Year Start
 On the context menu, choose the starting month of the fiscal year.
F. Creating Custom Dates

Custom dates are calculated date parts you can save in the Data window, and can be
Discrete (Date Parts) or Continuous (date values). Create a custom date so you can save
and reuse the custom date part or value without having to override the default behavior for
each use of the date.
Using custom dates also breaks the automatic date hierarchy tableau creates and allows for
each field to represent just itself – similar to a DATETRUNC() function.

1. Create a Custom Date


 In the data window, right click on the date field you want to use for the custom date,
and choose Create Custom Date.
 On the Create Custom Date dialog box, in the Name field, name the new custom
date field.
 From the Detail drop down list, select the date type you want to use.
 Choose Part to set the date as discrete, and Date value to set the date as
continuous.
NOTE : Options not available for a date type appear grayed out
 Click OK
G. Practice: Custom Dates

From the starter folder using your USB, open the package workbook named
Custom_Dates_Starter.twbx and creates two views according to the following
specifications:

1. Continuous Custom Date


 Shows a line chart of sales by order date.
 Use custom continuous dates shown in quarters.

2. Direction Details
 Create a custom date with a value of quarters, and name it “Order Date (Continuous
Quarters)”.
 Drag the newly created order date (continuous quarters) to column on top of the
month field to replace it entirely.
3. Discrete Custom Date
 Shows a bar chart of sales by order date.
 Uses custom discrete dates shown in quarters.
4. Direction Details
 Create a custom date with date value of quarters, changed to Date Part, and name
this field “Order Date (Discrete Quarters)”.
 Remove the date field on the columns shelf, and drag this new field to column.
 Change the mark type to bar.

5. Solution

a) Continuous Custom Dates


 From the Starter folder open the workbook named Custom_Dates_Starter.twbx and
select Sheet 1.
 In the Dimensions area of the Data window, right-click the Order Date field, and
choose Create Custom Date.
 In the Create Custom Date dialog box, name the custom date "Order Date
(Continuous Quarters)", select Quarters from the Detail drop down list, verify that Date
Value is selected, and click OK.
 Drag the newly created Order Date (Continuous Quarters) to Columns on top of
the Month field to replace it.
b) Discrete Custom Dates
• Switch to Sheet 2 of Custom_Dates_Starter.twbx.
• In the Data window, right-click on the Order Date field, and choose Create Custom Date.
• In the Create Custom Date dialog box, name the custom date "Order Date (Discrete
Quarters)", selects Quarters from the Detail drop down list, select Date Part, and then click
OK.
• Drag the newly created Order Date (Discrete Quarters) to Columns, and remove the other
instance of Order Date from Columns.
• On the Marks card, change the mark type to bar.

H. Practice: Using Missing Values to Show Gaps in Data

From the Starters folder open Showing_Gaps_in_Data_Starter.twbx and use Sheet 2 to


create a chart according to the following specification:
 Create the following view by showing Date as Discrete Day, including missing
values, and formatting null values:
1. Direction Details
 Create the following view on Sheet 1.

 For the DAY (Date) field, choose to show missing values.


There are now line breaks due to the new headers for on the horizontal axis
  Change the setting for SUM (Sales) to "Show at Default Value."
 Try the other options in this drop-down list and observe the differences in the view.
2. Solution

a) To Show missing values


 From the Starters folder, open showing_gaps_in_data_starter.twbx.
 On Sheet 1 note that the crosstab only has data for weekdays.
 Switch to Sheet 2.
 From Measures, drag Sales to Rows.
 From Dimensions, drag Date to Columns.
 On Columns right click YEAR (Date) and select the discrete day format (8).
 On Columns, on the DAY(Date) field, click the drop-down list and choose Show
Missing Values.
b) To Change how missing values are displayed
 Right-click on the Sales axis and choose Format.
 On the Pane tab, under Special Values, change the Marks drop-down list setting to
Show at Default Value.
 In the same drop down list, select Hide (Connect Lines).
 In the same drop down list, select Hide (Break Lines).
NOTE: The Solution workbook shows the results when stopping at step 2 above

You might also like