INTRODUCTION
Tableau is a powerful and versatile data visualization tool that allows individuals and
organizations to transform raw data into interactive, meaningful visual representations. It was
developed by Tableau Software and has gained immense popularity due to its user-friendly
interface, robust features, and ability to simplify complex data analytics and presentation
processes.
Data preparation in Tableau is the process of cleaning, transforming, and structuring raw data
to make it suitable for analysis and visualization within the Tableau platform. This crucial
step ensures that data is accurate, consistent, and properly formatted. Tableau provides a user-
friendly interface with various data connectors and tools to help users merge, pivot,
aggregate, and filter data, making it ready for creating insightful dashboards and reports.
Effective data preparation is essential for uncovering meaningful insights and presenting
data-driven stories in Tableau. In Tableau, data relationships and fields play a fundamental
role in organizing and visualizing data:
Data Relationships: Tableau allows you to establish relationships between tables from
different data sources or within a single data source. These relationships define how tables
are related to each other based on common fields, and they enable you to create meaningful
connections between disparate data sets. This feature is crucial for blending data and
performing more complex analyses.
Fields: Fields in Tableau are the individual data attributes or columns in your dataset. Each
field represents a specific data point, such as a date, category, or numerical value. Tableau
automatically identifies and categorizes fields as dimensions (categorical data) or measures
(quantitative data). You can use these fields to build visualizations and analyze data by
dragging and dropping them onto the appropriate shelves in the Tableau workspace.
By defining data relationships and working with fields, Tableau users can explore, analyze,
and create interactive visualizations to uncover insights and trends from their data, making it
a powerful tool for data analysis and reporting.
DATA BLENDING :
Data blending in Tableau is a technique used to combine data from multiple data sources in a
single visualization. This allows users to analyze and visualize data from different databases
or datasets that may not be directly related or linked through a common field.
Here's how data blending works in Tableau:
Primary Data Source: The primary data source is the main dataset that you start with in
Tableau. This is the dataset that you connect to first and is typically the primary focus of your
analysis.
Secondary Data Source: The secondary data source is an additional dataset that you want to
incorporate into your analysis. It may come from a different data connection or file. The
secondary data source doesn't need to have a direct relationship with the primary data source.
Linking Fields: To perform data blending, there should be at least one field that is common
between the primary and secondary data sources. This linking field is used to match data
between the two sources.
Blending Process: Tableau automatically recognizes common fields between the primary
and secondary data sources. When you create visualizations, Tableau combines data from
both sources on-the-fly, using the linking field to blend the data together.
Aggregation: The blending process usually involves aggregation. For example, if you're
blending sales data from two different sources, Tableau might aggregate the sales data for
each category or time period.
Blended Data: The result is a blended dataset that can be used to create visualizations and
dashboards. The blended data is dynamic, meaning it updates as you interact with the
visualizations.
Data Compatibility: It's important to note that the data types and structures of the linked
fields in the primary and secondary data sources should be compatible for blending to work
effectively.
Data Relationships: Tableau also provides options to adjust the relationships between the
primary and secondary data sources. You can choose how the data is blended based on the
relationship between the linked fields.
ADVANTAGES OF DATA BLENDING :
Integration of Heterogeneous Data: Data blending allows the integration of data from
different sources, which may have varying formats, structures, or granularities. This is
particularly useful when dealing with data from diverse departments or systems within an
organization.
Preservation of Data Granularity: Unlike traditional methods of data integration, such as data
warehousing, data blending retains the granularity of the original data sources. This is crucial
for maintaining detailed insights, especially in cases where aggregating data may result in
loss of valuable information.
Real-time or Near-real-time Analysis: Data blending can be performed in real-time or near-
real-time, providing the ability to generate insights from the most current data. This is crucial
in scenarios where timely decisions are required, such as in financial trading or operational
monitoring.
Flexibility and Agility: Data blending is highly flexible and adaptable. It allows analysts to
quickly bring in new data sources or modify existing ones without the need for extensive
ETL (Extract, Transform, Load) processes, making it suitable for environments with rapidly
changing data requirements.
Reduction of Data Duplication: Unlike some other data integration methods, data blending
does not require the creation of a centralized data repository, thereby reducing the need for
redundant storage and maintenance efforts.
Where Data Blending is Used:
Business Intelligence (BI) and Reporting: Data blending is extensively used in BI tools to
combine data from different departments or systems within an organization. This enables the
creation of comprehensive reports and dashboards that provide a unified view of the business.
Marketing and Sales Analysis: Marketers often use data blending to combine customer data
from various touchpoints (e.g., CRM, social media, website analytics) to gain a holistic
understanding of customer behavior, preferences, and engagement.
Finance and Investment Analysis: In finance, data blending is employed to integrate data
from various financial instruments, markets, and economic indicators. This is crucial for
portfolio management, risk assessment, and investment decision-making.
Healthcare and Life Sciences: Data blending is used to integrate patient records, clinical trial
data, electronic health records, and other healthcare-related information. This enables
comprehensive analysis for research, treatment planning, and operational optimization.
Supply Chain and Operations: Data blending is applied to combine data from various points
in the supply chain, including inventory, logistics, and production. This facilitates
optimization of operations, demand forecasting, and resource allocation.
Social Media and Web Analytics: Data blending is employed to combine data from different
social media platforms, website analytics tools, and other online sources. This helps in
understanding user behavior, engagement patterns, and the effectiveness of marketing
campaigns.
IoT (Internet of Things) and Sensor Data: In IoT applications, data blending is used to
integrate data from sensors, devices, and other IoT endpoints. This enables real-time
monitoring, predictive maintenance, and optimization of IoT systems.
AIM
To perform exercise on Data preparation, Data relationship and fields in Tableau.
DATASET DESCRIPTION
The dataset consists of four tables.
Product Table
ProductID: A unique identifier for each product.
ProductName: The name of the product.
Category: The category to which the product belongs (e.g., Electronics, Clothing,
Home Decor).
SupplierID: The identifier of the supplier providing the product.
Sales Table
SaleID: A unique identifier for each sale.
Date: The date when the sale occurred.
ProductID: The identifier of the product sold.
Quantity: The quantity of the product sold.
Price: The price per unit of the product.
CustomerID: The identifier of the customer who made the purchase.
Review Table
ReviewID: A unique identifier for each review.
ProductID: The identifier of the product being reviewed.
Date: The date when the review was written.
Rating: The rating given by the reviewer for the product (e.g., on a scale of 1 to 5).
Customer Table
CustomerID: A unique identifier for each customer.
FirstName: The first name of the customer.
LastName: The last name of the customer.
Address: The customer's address.
Country: The country in which the customer is located.
Email: The customer's email address.
LOADING DATA
DATA PREPARATION, DATA RELATIONSHIP AND FIELDS
VISUALISATION
BAR GRAPH DEPICTING TOTAL RATING OF THE PRODUCT
LINE GRAPH DEPICTING TOTAL COST BY PRODUCT ID
GRAPH DEPICTING TOTAL RATING OF THE PRODUCT BY CATEGORY
PIE CHART DEPICTING TOTAL PRICE PER PRODUCT BY PRODUCT NAME
LINE GRAPH DEPICTING QUANTITY OF PRODUCT BY PRODUCT ID