Tableau Desktop Fundamental Tutorial 1 : Connecting Data

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.  
  1. Under Sheet, double-click the table you want to connect to, or click and drag it to the white area labeled Drag sheets here.
  2. Note that in the upper area of the windows toward the right, under Connection, Live is automatically selected. 
  3. 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 
  1. 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
  1. 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 
  1. Connect to the Orders table in the Superstore Sales Training.xls data source (Download Here). 
  2. In the Data window, change the Order and Row fields to Dimensions. 
  3. Change the Default Properties of both Profit and Sales fields to Currency with 0 decimal places. 
  4. Change the Default Properties of te Discount field to use the Average aggregation, and use percentage with two (2) decimal places. 
  5. Edit the comment for Discount Field to read “Average Discount Percentage”. 
  6. Add Orders (Superstore Sales Training.xls) to Saved Data Sources. 
  7. Name the data source “My Superstore” and ensure it is saved in the My Tableau Repository folder, in the Data sources folder.
  8. 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
    • No wordlists for English -> Indonesian...
    • Create a new wordlist...
  • Copy
  • Add to Phrasebook
    • No wordlists for English -> Indonesian...
    • Create a new wordlist...
  • Copy

12 comments:

  1. Awesome article, Thanks for sharing.

    https://www.kellytechno.com/Hyderabad/Course/Tableau-Training

    ReplyDelete
  2. Wonderful post, Thanks for sharing.

    https://www.kellytechno.com/Hyderabad/Course/Tableau-Training

    ReplyDelete
  3. Inspirational post, Thanks for sharing.

    https://www.kellytechno.com/Hyderabad/Course/Tableau-Training

    ReplyDelete
  4. I think there is a need to provide information about Tableau and similar operations.

    Tableau Rest Api Connection

    ReplyDelete

  5. Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating
    Tableau Online Training
    Tableau Training
    Tableau support

    ReplyDelete
  6. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. Data Blending in Tableau

    ReplyDelete
  7. Thanks for your blog and very useful information. Keep posting.
    learn tableau
    tableau online training hyderabad

    ReplyDelete
  8. Hi there! It is a very interesting blog on Tableau Training topic. I was surfing through the internet for Tableau interview questions and came across your blog. You definitely have a good understanding of the topic. What do you think about these Tableau interview questions.

    ReplyDelete
  9. Thanks for sharing this blog. The content is beneficial and useful. Very informative post. Visit here to learn more about Data Mining companies and Data analytics Companies.

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete


  11. Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it up
    allsoftwarepro.com
    salview-crack
    virtual-audio-cable-crack
    tableau-desktop-crack

    ReplyDelete

Powered by Blogger.