2. Connecting to Data

Connecting to data

Tableau connects to variety of data sources. Tableau connects to most of the data sources natively.

Data Connection in Tableau

When Tableau desktop is launched, Data connection page comes up. Tableau desktop personal edition or public provides access to only file-based data sources such as Excel and Text files. Licensed version of Tableau desktop allows connection to any data source. You can connect to new data, data on the server or saved data sources.

  • In Tableau database tables and excel files work in a similar fashion. Individual worksheets in excel, work as database Tables. Data can be sourced from one or more sheets or tables.
  • Since version 2020, Relationships are a new way of combining data in Tableau. Developer need not remember the type of join to use but should focus on tables are related. Tables are related based on common field names.

Lab1. Connecting to the data source

In this exercise we will connect to Sample-SuperStore.xls.

This file is located under My Tableau repository/Datasources folder. Before moving further, review the file in xls. If this file is not available, please request your instructor. Copy the file under \Documents\My Tableau Repository\Datasources\2020\en_US-US

  1. Launch Tableau desktop.
  2. Click on “Excel” under Connect
  3. Browse to Sample – Superstore.xls under the following path  \Documents\My Tableau Repository\Datasources\2020\en_US-US
  4. Name of the datasource and sheets in xls will be visible. Datasource name (Sample – Superstore) can be modified.
  5. After selecting the file, you will see the following Connections screen,
  •  Drag Orders table/sheet to “Drag tables here” space.

7. Explore different options. You can rename the columns and change some of the other properties.

Manage metadata option will provide a useful interface to make these changes.

Click on Go to Sheet or Sheet 1 at the bottom to navigate to development canvas of Tableau.

Tableau automatically segregate your data in Dimensions and Measures. For each table, dimension fields appear above the gray line and measure appear below the gray line. Also, Dimensions appear in blue and measures appear in green.

Tableau Design Interface

Tableau desktop is a development environment and provides functionality to develop interactive visualization

Menu. To create a new file or save as existing file.  Can be used to create new sheets, dashboards etc.

Data window. Displays data connection and Dimensions and Measures in the data source.

Analytics. Contains ready-to use objects for faster analysis of data.

Pages. If a dimension is placed on Pages, displays separate page for each dimension. If a measure is used then measure is converted to discreet measure.

Filters. Filter shelf is used to place filters that limit the data.

Cards/shelves. Views are created by placing fields on the cards or shelves. Mark card have different shelfs such as color, size, label, detail, tooltip. Fields can be placed on these shelves. Mark Type can be changed from the drop down.

Toolbar. Provide quick access to undo/redo, adding sheets, sorting, displaying labels and so on.

Pills. Fields/ calculations on the rows/columns are called Pills. Click on a pill to access pull down menu options such as filter, Table calculations etc.

View/Canvas. Displays visualization created by the fields placed on the shelves.

Show Me. For fields selected in the data window, Tableau suggests the best suited visualization. Different visualizations can be selected in the “Show Me” box.

Status bar. Displays various attributes of the visualization in the current worksheet. It displays information such as number of Marks, number of rows and columns and aggregated measure.