2 - Connecting To The Data
2 - Connecting To The Data
Business Scenario
A Cosmetic Industry has recently acquired the Tableau software to strengthen its analysis and reporting
capability, by analyzing millions of rows of client data for marketing. Being a data manager, you are
asked to blend the data from multiple data sources using Tableau. To get started, you first need to
connect to a data source.
Overview
In this exercise you will:
Detailed Instructions
Open Tableau
OR
On the Data menu, select Connect to data.
4. In the Open window, navigate to the Documents\My Tableau Repository folder and double-
click Datasources.
5. Select Sample - Superstore Subset (Excel).xlsx file.
6. Click Open.
7. In the Tableau - Book window, Under sheets in the left pane, drag the Orders table to the Drag
sheets here pane as shown in the image below:
8. Click Go to Worksheet.
Note: Below Connection make sure Live radio button is selected.
Create View
Use the Orders and Users sheet in the Sample- Superstore Subset (Excel) excel file.
Detailed Instructions
1. Open the State Sales Value Map workbook.
2. On the Data menu, point to Orders(Sample - Superstore Subset (Excel)) and click Edit Data
Source as shown below:
3. Drag Users table in the Drag sheets here pane to create a join between two tables. It will display
data for both the tables:
4. Click Go to Worksheet.
5. In the Columns shelf, click the Longitude (generated) drop down list, and select Remove.
6. In the Rows shelf, click the Latitude (generated) drop down list and select Remove.
7. In the Marks card, click the State and Province drop down list and select Remove.
Note: There are two State and Province on Marks card, remove both.
8. In the Marks card, click the SUM (Sales) drop down list and select Remove.
Create View
9. In the Data pane, under Dimensions, locate and drag Region (Users) to the Columns shelf.
10. In the Data pane, under Measures, locate and drag Sales to the Rows shelf.
11. To change the graph type, in the Marks card, click the drop-down and select Line.
Blend the data from two data sources by connecting to both the data sources at a time.
Add Profit and Department data from Sample-Superstore-English (Extract) data source.
Add Gross Profit Ratio data from Sample-Superstore Subset (Excel) data source.
Analyze the Profit and Gross profit ratio for each department.
Detailed Instructions
1. On the Home page, under Saved Data Sources, click Sample-Superstore-English (Extract) data
source.
Note: Open a new workbook, do not use previous exercise workbook.
Create View
2. In the Data pane, under Dimensions, locate and expand Product Dimension and drag
Department to the Rows shelf.
3. In the Data pane, under Measures, locate and drag Profit to the Columns shelf.
4. On the upper right corner of the workbook, click the Home page tab as shown below:
5. On the Home page, under Saved data sources, click Sample-Superstore Subset (Excel) data
source.
6. In the Data pane, under Measures, locate and drag Gross Profit Ratio to the Columns shelf.
Note: Observe the orange check marked data source symbol that appears next to Gross Profit
Ratio field in the Columns shelf. This indicates that the field is coming from a secondary data
source.
Exercise 2.4: Copy the data from an excel sheet and paste it in the
Tableau workbook
Overview
In this exercise you will:
Copy the data from an excel sheet and then directly paste it in the Tableau’s workbook.
Use the Orders sheet in the Sample- Superstore Subset (Excel) excel sheet to get the data
for the first 25 products and their corresponding base margin values.
Create a horizontal bar graph view for the data in Tableau.
Detailed Instructions
1. On your Desktop, browse to the Documents\My Tableau Repository folder and double-click
Datasources.
2. Double-click Sample- Superstore Subset Excel.xlsx excel sheet.
3. In the excel sheet, select the first 25 rows of Product Name and Product Base Margin Columns
data as shown below:
7. In the Data pane, under Measures, locate and drag Product Base Margin to the Columns shelf.
Detailed Instructions
Create View
1. On the Home page, under Saved data sources, click Sample-Coffee Chain (Access).
2. In the Data pane, under Dimensions, locate and drag Date to the Columns shelf.
3. In the Data pane, under Dimensions, locate and drag Product to the Rows shelf.
4. In the Data pane, under Measures, locate and drag Sales to the Text in the Marks card.
Create Extract
5. On the Data menu, point to Sample-Coffee Chain (Access), and select Extract Data.
8. Click Extract.
Save Extract
Refresh Extract
10. On the Data menu, point to Sample-Coffee Chain (Access), and select Refresh.
11. On the File menu, select Save.
12. In the Save As window browse to the Documents\My Tableau Repository\Workbooks and save
workbook as Data Extract-Example.