Tableau Desktop Fundamental Tutorial 1: Connecting Data: Data Visualization and Business Intelligence
Tableau Desktop Fundamental Tutorial 1: Connecting Data: Data Visualization and Business Intelligence
HOME
ABOUT
TUTORIAL
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.
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.
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:
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. 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:
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.
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.
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
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
Use the marks card to change the attributes of marks in your view.
Create the view by dragging the following elements from the Data windows to
specified location:
2. Solution
HOME
ABOUT
TUTORIAL
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
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.
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.
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.
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.
A computed sort sets the sort order and changes dynamically as the data changes. There
are several types of computed sorts.
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)
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
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
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
HOME
ABOUT
TUTORIAL
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:
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.
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”.
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
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
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
Add to Phrasebook
o No wordlists for English -> English...
o Create a new wordlist...
Copy
TABLEAU
HOME
ABOUT
TUTORIAL
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.
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.
You can move discrete date parts to different shelves or to a nonlinear order.
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
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.
5. Solution
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.
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.
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:
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