Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Introduction to Tableau ยท Lesson 4 of 9

Module Three

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
4

Module 3: Connecting and Preparing Data in Tableau

Welcome to Module 3 of Introduction to Tableau! In the previous module, you learned about the Tableau workspace, Dimensions, Measures, Rows, Columns, and the Marks Card. Now, you will learn how to bring information into Tableau so that you can start analysing it. Imagine you own a supermarket in Ibadan. You have an Excel file containing the names of products, their prices, quantities sold, and total sales. You want to use Tableau to understand which products customers buy the most. Before Tableau can create charts from this information, you need to connect it to your data. Let's learn how to do that!

3.1 Understanding Data Sources in Tableau

A data source is where information comes from.

Think about your school. Your teacher may keep students' names and examination scores in an Excel spreadsheet. That spreadsheet is a data source.

Tableau connects to data sources so that you can study the information and create visualisations.

Examples of Data Sources

  • Microsoft Excel: Information stored in Excel workbooks.
  • CSV Files: Information stored as comma-separated values.
  • Text Files: Information saved in text formats supported by Tableau.
  • Databases: Information stored in systems such as MySQL, PostgreSQL, and Microsoft SQL Server.
  • Cloud Data: Information stored in supported online services and platforms.

Tableau supports different connections depending on the product, version, and available drivers.

3.2 Connecting Tableau to Microsoft Excel

Microsoft Excel is one of the easiest ways for beginners to practise using Tableau.

Imagine you have a spreadsheet containing the sales records of a supermarket.

Example: Supermarket Sales Dataset

Product Category Quantity Sold Price
Rice Food 20 75000
Bread Food 15 1500
Milk Drinks 10 2500
Noodles Food 30 1200
Soft Drink Drinks 25 1000

Steps for Connecting Excel to Tableau

  1. Open Tableau Public or Tableau Desktop.
  2. Look for the Connect section on the start page.
  3. Select Microsoft Excel.
  4. Find the Excel file on your computer.
  5. Select the file and click Open.
  6. Tableau will display the available sheets in the workbook.
  7. Drag the required sheet into the data source area.
  8. Check that the information has loaded correctly.

You have now connected an Excel spreadsheet to Tableau!

3.3 Connecting Tableau to CSV Files

A CSV file is another common way of storing information.

CSV means Comma-Separated Values.

It is a simple file format that stores information as text, with commas separating values in each row.

Example of CSV Information

Student,Class,Score
Ada,JSS 2,85
John,JSS 2,70
Mary,JSS 3,95
David,JSS 3,60

Each line represents a record, while the commas separate the different fields.

Steps for Connecting a CSV File

  1. Open Tableau.
  2. Find the Connect section.
  3. Select Text File.
  4. Locate your CSV file.
  5. Select the file and click Open.
  6. Tableau will display the information.
  7. Check that the columns and values are correct.

Once the connection is successful, you can use the information to create charts and dashboards.

3.4 Understanding Data Tables and Fields

When you connect a dataset to Tableau, you will see information arranged in rows and columns.

Let's understand what these terms mean.

What Is a Data Table?

A data table is a collection of related information arranged in rows and columns.

For example, a school may have a table containing students' names, classes, ages, and examination scores.

What Is a Row?

A row contains information about one record or item.

In a student database, one row may contain all the information about Ada.

What Is a Column?

A column contains one type of information about different records.

For example, a Student Name column contains the names of all students.

What Is a Field?

A field is an individual piece of information or attribute in a dataset. In a simple spreadsheet, a field usually corresponds to a column.

Examples include:

  • Student Name
  • Age
  • Class
  • Examination Score
  • City
  • Sales Amount

Example: Student Records

Student Name Age Class Score
Ada 13 JSS 2 85
John 14 JSS 2 70
Mary 13 JSS 3 95

In this table:

  • There are four columns.
  • There are three student records.
  • Student Name, Age, Class, and Score are fields.

3.5 Checking Data Types and Field Properties

Not all information is the same. Some information contains words, while other information contains numbers or dates.

Tableau uses data types to understand what kind of information is stored in each field.

Common Data Types in Tableau

1. String

String data contains text or characters.

Examples: Student Name, Product Name, City, and Department.

2. Number (Whole)

Whole numbers are numbers without decimal points.

Examples: 10, 25, 100, and 500.

3. Number (Decimal)

Decimal numbers contain decimal points.

Examples: 12.5, 45.75, and 99.99.

4. Date

Date fields contain calendar dates.

Example: 26 November 2026.

5. Date and Time

This data type contains both a date and a time.

Example: 26 November 2026, 10:30 AM.

6. Boolean

Boolean data contains two possible values: True or False.

Example: Is the student registered? True or False.

Why Are Data Types Important?

Imagine Tableau receives a field containing examination scores, but the scores are stored as text instead of numbers.

Tableau may not be able to calculate the average score correctly until the field is converted to a suitable numerical data type.

Using the correct data type helps Tableau perform calculations and display information properly.

3.6 Basic Data Cleaning and Preparation

Before analysing information, you should check that the data is organised and accurate.

This process is called data cleaning.

Imagine you receive a supermarket sales spreadsheet containing mistakes. Some product names are spelt differently, some prices are missing, and some records appear twice.

If you analyse the information without checking it, your results may be incorrect.

Common Data Problems

1. Missing Values

A missing value occurs when information is not provided in a field.

Example: A sales record has a product name and quantity but no price.

2. Duplicate Records

A duplicate occurs when the same record appears more than once when it should only appear once.

Example: The same customer transaction is accidentally entered twice.

3. Spelling Differences

Sometimes the same item is written in different ways.

Example:

  • Ibadan
  • ibadan
  • IBADAN

These values may refer to the same city but could be treated as separate categories in some analyses.

4. Incorrect Data Types

A numerical value may accidentally be stored as text.

Example: The number 5000 is stored as a text field instead of a numerical field.

5. Extra Spaces

Sometimes information contains unnecessary spaces.

Example: "Rice" and " Rice " may appear as different values in a dataset.

Basic Ways to Prepare Data in Tableau

  • Check that the correct columns are available.
  • Confirm that each field has the appropriate data type.
  • Look for missing or unusual values.
  • Review duplicate records.
  • Use available filters to examine unwanted records.
  • Use Tableau's supported data preparation features where necessary.

Important: Tableau provides tools for organising and preparing data, but more complicated cleaning may be easier in Excel, Tableau Prep, or another data preparation tool.

3.7 Understanding Data Relationships

Sometimes information is stored in different tables.

For example, a supermarket may have one table containing product information and another table containing sales transactions.

Tableau can combine related tables so that you can analyse information from different sources.

Example: Two Tables

Products Table

Product ID Product Name
101 Rice
102 Bread
103 Milk

Sales Table

Product ID Quantity Sold
101 20
102 15
103 10

Both tables have a Product ID field.

Tableau can use this shared field to understand which sales records belong to which products.

This connection is called a relationship.

Relationships help Tableau work with information stored in separate tables without requiring you to manually combine everything into one table first.

3.8 Practical Activity: Connecting a Student Dataset

Now it is time to practise!

Your task is to connect a student examination dataset to Tableau.

Step 1: Prepare Your Data

Create a spreadsheet in Excel with the following information:

Student Class Age Mathematics English
Ada JSS 2 13 85 78
John JSS 2 14 70 82
Mary JSS 3 13 95 90
David JSS 3 14 60 68

Step 2: Save Your Spreadsheet

Save the file with this name:

Student_Examination_Records.xlsx

Step 3: Connect to Tableau

  1. Open Tableau Public or Tableau Desktop.
  2. Select Microsoft Excel under the Connect section.
  3. Choose Student_Examination_Records.xlsx.
  4. Open the spreadsheet.
  5. Check that all the student records appear correctly.

Step 4: Examine Your Fields

Identify the fields that contain text and the fields that contain numbers.

  • Student: String
  • Class: String
  • Age: Whole Number
  • Mathematics: Whole Number
  • English: Whole Number

Step 5: Save Your Workbook

Save your Tableau workbook with the name:

Student_Performance_Practice

Congratulations! You have completed your first data connection exercise.

3.9 Key Terms to Remember

  • Data Source: The location from which information is obtained.
  • Excel: A spreadsheet application used to organise information.
  • CSV: A file format that stores information using comma-separated values.
  • Data Table: Information arranged in rows and columns.
  • Row: A record containing information about an item or person.
  • Column: A section containing one type of information.
  • Field: An individual attribute or category in a dataset.
  • Data Type: The type of information stored in a field.
  • Data Cleaning: Finding and correcting problems in a dataset.
  • Duplicate: A repeated record that should not appear more than once.
  • Relationship: A connection between related tables in a data source.

3.10 Module 3: Knowledge Check

Answer these questions to test your understanding.

  1. What is a data source?
  2. Give four examples of data sources supported by Tableau.
  3. What does CSV mean?
  4. What is the difference between a row and a column?
  5. What is a data field?
  6. What is a String data type?
  7. Give two examples of numerical data.
  8. What is data cleaning?
  9. Why should you check for duplicate records?
  10. What is a relationship between tables in Tableau?

Module Summary

In this module, you learned how to connect Tableau to different data sources, including Excel and CSV files.

You also learned how to identify rows, columns, and fields, understand different data types, and prepare information for analysis.

Finally, you discovered how Tableau can work with related tables to analyse information from different sources.

Remember: Good analysis starts with good data. Always check your information before creating charts and dashboards.

Coming Up Next: Module 4 โ€“ Creating Charts and Visualisations

In the next module, you will learn how to create bar charts, line charts, pie charts, tree maps, and scatter plots using Tableau. You will also learn how to sort and filter information to make your reports more useful.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’