Tableau An Over View
GAYATRI VIDYA PARISHAD COLLEGE
FOR DEGREE AND P.G. COURSES (A)
DEPARTMENT OF BACHELOR OF SCIENCE
HONOURS (DATA SCIENCE)
SEMESTER-IV
COURSE 9: DATA VISULIZATION USING
TABLEAU
Credits:
3 3
hrs/week
Aim
and objectives of Course:
· To know the importance of data Visualization in the
world of Data Analytics and Prediction
· To know the important libraries in Tableau
· To get equipped with Tableau Tool
Learning
outcomes of Course:
· Students should be able to visualize data through
seven stages of data analysis process
· Should be able to do explanatory and hybrid types
of data visualization
· Should be able to understand various stages of
visualizing data
UNIT I:
Creating Visual Analytics with
tableau desktop, connecting to your data-How to Connect to your data, What are
generated Values? Knowing when to use a direct connection, Joining tables with
tableau, blending different data sources in a single worksheet.
UNIT II:
Building your first
Visualization- How Me works- Chart types, Text Tables, Maps, bar chart, Line
charts, Area Fill charts and Pie charts, scatter plot, Bullet graph, Gantt
charts, Sorting data in tableau, Enhancing Views with filters, sets groups and
hierarchies.
UNIT III:
Creating calculations to enhance
your data- What is aggregation, what are calculated values and table
calculations, Using the calculation dialog box to create, building formulas
using table calculations, Using table calculation functions
UNIT IV:
Using maps to improve
insights-Create a Standard Map View, Plotting your own locations on a map,
Replace Tableau’s standard maps, Shaping data to enable Point-to-Point
mapping.
UNIT V:
Developing an Adhoc analysis
environment- generating new data with forecasts, providing self-evidence adhoc
analysis with parameters, Editing views in tableau Server.
TEXT BOOKS:
1. Tableau your data-Daniel G.
Murray and the Inter works BI team, Wiley Publications
2. Tableau Data Visualization
Cookbook, Ashutosh Nandeshwar, PACKT publishing.
3. Storytelling with Data: A Data
Visualization Guide for Business Professionals by Cole Nuss baumer Knaflic
(2014)
4. ggplot2: Elegant Graphics for
Data Analysis by Hadley Wickham (2009)
REFERENCE BOOKS:
1. Designing Data Visualizations:
Representing Informational Relationships by Noah Iliinsky, Julie Steele (2011)
2. Alexandru C. Telea – “Data
Visualization principles and practice” Second Edition, CRC Publications 3.
Joshua N. Millign –“Learning Tableau -2019” – Third Edition- Packt publications
Student Activity
Create a sample super store data
set and visualize the following requirements General Requirements
1. Dashboard size is 1250px wide
by 750px tall.
2. Prefer using containers
3. The dashboard has a total of 5
containers (no more, no less)
4. The Filter Pane
5. Each filter has some padding
I. Charts Pane Requirement
1. All 3 charts must be in one
vertical container
2. Do proper formatting
3. Each chart has some padding
between them and other objects
4. Each chart has a grey border,
slightly darker than the Pane background color.
5. The Pane under the Title has a
border
II. The second graph should have
the title as “Sales” and should show monthly sales per year. Make sure it is an
area chart with proper formatting.
III. The third graph should the
title as “Profit” and should show monthly profit per year. Make sure it is an
area chart with proper formatting.
Continuous assessment:
Let the students be tested in the
following questions from each
unit 1. What are generated
values? Join tables using Tableau
2. Create any visualization
charts using Chart types, Text Tables, Maps, bar chart, Line charts, Area Fill
charts and Pie charts, scatter plot etc.,
3. What is aggregation, what are
calculated values and table calculations?
4. Using Standard Map View, Plot
your own locations on a map
5. Develop an Adhoc analysis
environment
SEMESTER-IV
LAB COURSE 9: DATA VISUALIZATION
Practical Credits: 1 2 hrs/week
1. Connect to data Sources
2. Create Univariate Charts
3. Create Bivariate and
Multivariate charts
4. Create Maps
5. Calculate user-defined fields
6. Create a workbook data extract
7. Save a workbook on a Tableau
server and web
8. Export images, data.
|
|
GAYATRI
VIDYA PARISHAD COLLEGE
FOR DEGREE AND PG COURSES (AUTONOMOUS) Affiliated
to Andhra University || Accredited by NAAC and NBA VISAKHAPATNAM |
Course: Data
Visualization Using Tableau
B.Sc. DATA SCIENCE
– SEMESTER – IV
Time: 3
Hours Max Marks: 60
MODAL PAPER
SECTION-A
Answer the following 5
x 2 = 10 M
- What
are the different types of data sources that Tableau can connect? (CO1)
- What
is ‘Show Me’ in Tableau? (CO2)
- What
is Aggregation in Tableau? (CO3)
- State
how to plot our own locations on a map using tableau. (CO4)
- Explain
the key factors influencing the accuracy of forecasts in Tableau (CO5)
SECTION-B
Answer the following 5 x 10 = 50 M
- (a). Explain how to
creating Visual Analytics with Tableau desktop. How do you establish a relationship
between different data sources in a worksheet? (CO1)
(OR)
(b). What are Generated Values in
Tableau? Explain the importance of
linking fields in data blending. State its limitations. (CO1)
- (a). Explain how to create
different types of charts using Tableau. (CO2)
(OR)
(b). Analyze
how to help Filters and Maks Pane in preparation of Charts. (CO2)
- (a). Briefly outline how to building formulas using Table calculation functions in Tableau. (CO3)
(OR)
(b). Explain how to use calculation
dialog box to create calculated fields. (CO3)
- (a). Explain how do you
replace Tableau standard maps with custom map. (CO4)
(OR)
(b). Explain
how Tableau helps to improve insights using Maps. (CO4)
- (a). Discuss how to
develop an adhoc analysis environment using Tableau. (CO5)
(OR)
(b). What are the steps to modify
an existing view in Tableau Server, and how do user permissions impact the
ability to edit and save changes? (CO5)
BLUE PRINT
|
Unit |
Essay
Questions (Internal
Choice) |
Short
Answer Questions |
|
I |
2 |
1 |
|
II |
2 |
1 |
|
III |
2 |
1 |
|
IV |
2 |
1 |
|
V |
2 |
1 |
UNIT-1:
What is Tableau Desktop?
Tableau Desktop is a powerful data
visualization and business intelligence (BI) tool that allows users to
connect, analyze, and visualize data interactively. It helps businesses and
individuals create interactive dashboards, reports, and charts to derive
insights from data quickly and efficiently.
Important Features of Tableau
Desktop
- Data
Connectivity
– Connects to various data sources, including Excel, SQL databases, cloud
services (Google Sheets, AWS, etc.), and big data platforms.
- Drag-and-Drop
Interface –
Users can build visualizations easily without coding.
- Data
Blending and Integration
– Combines data from multiple sources to create a unified view.
- Interactive
Dashboards
– Allows filtering, highlighting, and drilling down into data for deeper
insights.
- Real-Time
Data Analysis
– Supports live and extract data connections for real-time or offline
analysis.
- Advanced
Analytics –
Offers statistical functions, trend analysis, and predictive modeling.
- Mapping
and Geographic Analysis
– Supports geospatial data visualization with maps.
- Collaboration
and Sharing
– Dashboards can be shared via Tableau Server, Tableau Online, or exported
in various formats (PDF, PNG, etc.).
Uses of Tableau Desktop
- Business
Intelligence (BI) Reporting
– Used in finance, sales, marketing, healthcare, and other industries to
analyze performance.
- Data-Driven
Decision Making
– Helps organizations make informed decisions based on visual insights.
- Market
Analysis –
Analyzes trends, customer behavior, and competitive positioning.
- Academic
and Research Analysis
– Used by researchers and students for data exploration and presentation.
Tableau Desktop Editions
- Tableau
Desktop Personal
– Limited to private use with file-based data sources.
- Tableau
Desktop Professional
– Connects to all data sources and supports collaboration with Tableau
Server and Online.
- Tableau
Public – A
free version with limited features, mainly for sharing visualizations
publicly.
How to Connect to our Data in Tableau
Desktop
Tableau Desktop allows you to
connect to various data sources, including files, databases, and cloud-based
services. Here's a step-by-step guide to connecting your data in Tableau
Desktop.
Step 1: Open Tableau Desktop
- Launch
Tableau Desktop on your computer.
- The Start Page appears with options to connect to different data sources.Step 2: Choose a Data Source
A. Connect to Files
- Click
on "Microsoft Excel" to connect to an Excel file.
- Click
on "Text File" to connect to CSV or TXT files.
- Click
on "JSON," "PDF," or other supported file formats
as needed.
B. Connect to Databases and
Servers
- Click
on "Microsoft SQL Server", "MySQL", "PostgreSQL",
etc., to connect to relational databases.
- Provide
server credentials (host, username, password) if required.
- Select
the database and tables you want to use.
C. Connect to Cloud Services
- Click
on "Google Sheets", "AWS Redshift", "Snowflake",
etc., to connect to cloud-based data.
- Authenticate
with your Google, AWS, or other cloud credentials.
Step 3: Load and Preview Your
Data
- After
selecting the data source, Tableau displays a preview of your data.
- You
can:
- Rename
columns
- Change
data types (e.g., string to date)
- Filter
or clean data before visualization
Step 4: Drag Tables into the Data
Pane
- If
working with multiple tables, drag and drop them into the Data
Pane.
- Use
Joins or Relationships to combine tables if needed.
Step 5: Start Visualizing Data
·
Click
"Sheet 1" at the bottom to move to the Worksheet.
· Drag fields from the Data Pane to the Rows and Columns to create visualizations.
Generated Values in Tableau
Generated values in Tableau refer to automatically
created fields that Tableau provides for every data source. These values
are not directly present in the dataset but are created by Tableau for enhanced
functionality and analysis.
Types of Generated Values in
Tableau
1. Measure Names & Measure
Values
- Measure
Names: A
system-generated field that contains the names of all numeric measures
in the dataset.
- Measure
Values: A
system-generated field that contains the actual values of all
measures.
Note:
Used when
multiple measures need to be displayed in a single visualization (e.g., a
combined chart for sales and profit).
2. Number of Records (Deprecated
in newer versions)
- Represents
the count of rows in a dataset.
- Can
be used to calculate aggregations such as COUNT, SUM, or AVERAGE.
3. Latitude (Generated) &
Longitude (Generated)
- Automatically
generated when Tableau detects a geographic field like country,
state, or city.
- Used
in map visualizations to place data points on a geographical map.
- Tableau
assigns approximate latitude and longitude coordinates based on
known geographic locations.
4. Table Calculation Fields
- Generated
dynamically when users apply quick table calculations (e.g.,
Running Total, Moving Average, Percent Difference).
- These
calculations exist temporarily and are not stored in the dataset.
Importance of Generated Values
✅
Simplifies data visualization by reducing the need for manual
calculations.
✅ Supports
dynamic filtering and analysis (e.g., using Measure Names & Measure
Values in dashboards).
✅ Enhances
geographic mapping with Latitude & Longitude (Generated).
When to Use a Direct Connection in
Tableau
A direct connection means
Tableau pulls data directly from the source without storing it locally.
When to Use a Direct Connection
✅
Real-Time Data Analysis – When you need live, up-to-date data (e.g.,
stock market, sales dashboards).
✅ Large
Datasets – If the data is too large to extract efficiently.
✅ Frequent
Data Changes – If the data updates regularly and must reflect the latest
values.
✅ Server-Based
Data Sources – When connecting to databases like SQL Server, MySQL,
Snowflake, etc.
Note: Example:
Analyzing live sales data from a company’s ERP system without exporting it to
an Excel file.
Joining Tables in Tableau
A join combines data from
multiple tables within the same data source (e.g., SQL database, Excel
file).
Types of Joins in Tableau
🔹 Inner Join – Returns only matching records
from both tables.
🔹
Left Join – Returns all records from the left table and matching records
from the right.
🔹
Right Join – Returns all records from the right table and matching
records from the left.
🔹
Full Outer Join – Returns all records from both tables, filling gaps
with NULLs where no match exists.
When to Use Joins
✅
When working with related tables in the same database (e.g., Orders and
Customers tables).
✅ When
tables share a common key (e.g., Customer ID, Product Code).
✅ When
performing relational database queries inside Tableau.
Note:
Example: Joining
"Sales" and "Product Details" tables using "Product
ID" to analyze total sales by category.
Blending Different Data Sources in a
Single Worksheet
Data Blending combines data from multiple,
independent sources (e.g., MySQL + Excel). Unlike joins, blending happens at
the visualization level and keeps data sources separate.
When to Use Data Blending
✅
When data is stored in different databases or formats (e.g., SQL + Google
Sheets).
✅ When
direct joins aren’t possible due to different data structures.
✅ When
analyzing separate but related data sources (e.g., sales data from Excel +
website traffic from Google Analytics).
✅ When
performance is an issue with large datasets (Blending processes only required
data).
Note: Example:
Blending "Sales Data" from MySQL and "Customer Feedback"
from an Excel file to analyze sales performance and customer satisfaction
together.
UNIT-2
Importance of Data Visualization
Data
visualization is a graphical representation of quantitative information and
data by using visual elements like graphs, charts, and maps.
➢ Data visualization
convert large and small data sets into visuals, which is easy to understand and
process for humans.
➢ Data visualization
tools provide accessible ways to understand outliers, patterns, and trends in
the data.
➢ In the world of Big
Data, the data visualization tools and technologies are required to analyze
vast amounts of information.
➢ Data visualizations
are common in your everyday life, but they always appear in the form of graphs
and charts. The combination of multiple visualizations and bits of information
are still referred to as Infographics.
➢ Data visualizations are
used to discover unknown facts and trends. You can see visualizations in the
form of line charts to display change over time. Bar and column charts are
useful for observing relationships and making comparisons. A pie chart is a
great way to show parts-of-a-whole. And maps are the best way to share
geographical data visually.
Today's
data visualization tools go beyond the charts and graphs used in the Microsoft
Excel spreadsheet, which displays the data in more sophisticated ways such as
dials and gauges, geographic maps, heat maps, pie chart, and fever chart.
Steps to prepare data visualization:
Step-1:
In the Tableau, connect to the databases.
The
data source has three data (Coffee Shop) files – Fact Table, Location and Product.
These are three different excel sheet present in one data file.
Open Product data file
Add fact table it contains the information about each product
Now we see the embedding of two data files
If
you’ll float on the join then you can see that there is a inner join using the common
key i.e. Product ID. Inner join simply means that there are two
files have a field in common and it can be combined easily.
Next,
add the Location file and it can be see that it is also joined.
Now,
that data is completely ready for data visualization
Click Quantity and
then at the top right corner of the screen, at the right edge of the tool bar,
there is the Show Me button. Visualization can be obtained
using the Show Me option.
So, click text table option then one can get 746, 160 is visible. So that’s not a very interesting visualization. Let us create new visualization with more fields.
Select
multiple fields that aren’t next to each other. You will click quantity again
and Product Category. Tableau will display a much wider variety of available
visualizations that can be created.
How "Me" Works
When
we creating our first visualization in Tableau, it's essential to understand
how the "Me" perspective works, referring to user interaction,
customization, and personalization within Tableau.
1. Connecting to Data
- Open Tableau Desktop and
click on Connect to import your dataset (Excel, CSV, SQL, etc.).
- Choose the required table and drag
it into the data source workspace.
2. Understanding the
Tableau Interface
- Data Pane:
Displays all dimensions and measures.
- Sheets & Dashboard:
Where visualizations are built.
- Show Me Panel:
Suggests best-fit visualizations based on selected data.
3. Building the First
Visualization
- Drag a dimension (e.g.,
"Category") to Columns.
- Drag a measure (e.g.,
"Sales") to Rows.
- Tableau automatically generates a bar
chart.
4. How "Me" Works – Customizing the View
- Click on Show Me to explore
different chart types.
- Drag another dimension (e.g.,
"Region") to Color under the Marks card.
- Change chart type to Pie Chart,
Line Graph, or Scatter Plot as needed.
5. Interactivity &
Filters
- Drag a field (e.g.,
"Region") to Filters to allow user-driven insights.
- Right-click and choose Show
Filter to make it interactive.
6. Adding Tooltips
& Labels
- Drag "Sales" to Label
to display values.
- Click on Tooltip to
customize pop-up information.
7. Saving & Sharing
the Dashboard
- Go to File > Save As
(Tableau Workbook format).
- Publish to Tableau Server or
Tableau Public for sharing.
How to connect Text file to Tableau
Step-1: Open the Tableau window
Step-2: Import the Text file (from your
drive) through the data source
Step-3: Select all order fields (Column fields) and
then right click on the any selected filed the pop-up box appear, here select
the pivot.
Step-4: Select New Sheet, you get like
the below. Here you may observe the fields Pivot Field Names and Pivot Field
Values.
Step-5: Select any customer by using
filter option in the tableau interface and then select any one customer example:
Julia.
By double click the Pivot Field Values and rename it as Order (Quantity)
After that drag and drop the Pivot Field names into columns, one will get (i.e., Pivot Field names represent Date) so change the name of Pivot Field Names as Date.

Now change the New Date into Months format by the
following
- Right Click on Year (New data)
and then pop-up box appear
- Select months
Chart
Types
a) Creation
of Bar Chart:
Step
1: Connect to Data
- Open Tableau and connect to
your dataset (Excel, CSV, SQL, etc.). (Ex: Coffee Type data file)
- Go to Sheet 1 after loading the data.
Step
2: Drag Fields to Create a Bar Chart
- Drag a Dimension (Category,
Product, Region, etc.)
to the Rows shelf.
- Drag a Measure (Sales,
Profit, Quantity, etc.)
to the Columns shelf.
- Tableau will automatically generate a bar chart. If you need to customize
Step 3: (i) Simple Bar Chart
- Change Bar Direction: Swap fields between Columns
and Rows to switch between vertical and horizontal
bars.
- Color & Labels:
- Drag a field to the Color
shelf in the Marks card to color bars by category.
- Click on the Label option to show values on bars.
- (ii). Bar Chart with Aggregate and Disaggregate Data
(Retail Sales data set from the Training Data sets)
Step-1: Import the Retail Sales data set. Take new worksheet. Drag and drop Product Container to Column shelf and Sales to row shelf. Double click Sales then the resultant chart i.e, Bar represents the data in aggregate.
- Change Bar Direction: Swap fields between Columns
and Rows to switch between vertical and horizontal
bars.
Step-2: If you need to represent
the data in disaggregate level then go to Analysis tab (Ribbon on Top) and deselect
Aggregate. You will get the chart i.e. each Bar at disaggregate.
(iii).
Gantt Bar
(Retail
Sales data set from the Training Data sets)
Step-1:
Repeat the above
two steps
Step-2: Open Automatic in Mark Pane, in
the drop menu select Gantt Bar.
(iv).
Bar in Bar
Step-1: Import the Retail Sales data set.
Take new worksheet. Drag and drop Product Segment to Row shelf and Measure
Names to row shelf, Double click Sales and Profits (Or Right click on Measure
Names then select Sales and Profits in the drop button) then the resultant
chart.
Step-2: Click side by side bar chart
from the Show Me menu
Step-3:
Drag and drop
the Measure Names into Colors under Marks Pane. If you need to change the
positions of Sales and Profits with in the Bar,
If you
need to show in the other way then drag and drop the Measure Names in to
Shapes.
(v)
Stacked Bar
Step-1:
Import the Retail
Sales data set. Take new worksheet. Drag and drop Shipping Mode to Column shelf
and Order date to row shelf, Double click Sales then the resultant chart
If you need to present each stack bar with a percentage, drag and drop the sales measure into the Marks Pane. Now Right Click on Sales then appear the pop-up box, select Quick Table Calculation and then select Percent of total. Now click and drag the Sales into the Label. The resultant as
Step-1: Import the Coffee Shop data set. After connecting the data file, take new worksheet. Drag and drop Product type and Product to Row shelf and Budget sales put into column shelf.
Step-2:
Now drag and
drop Sales into column shelf you will get side by side bar graph.
Step-3: Now expand the show me where select bullet bar chart, it clearly visualize the Budget Sales as color and Actual Sales in a st.line. If you place the cursor, observe the difference.
Step-1:
Connect the
Retail sales data
Step-2:
Open New
worksheet and drag and drop State into Column shelf, Discount and Profit
into Row shelf.
Step-3:
a) Right click
on the Row shelf measure value i.e., Discount and Profit and then select
the average rather than sum.
b) Right click on the measure axis, select dual axis in the popup box. Now you place the cursor anywhere its shows avg discount and avg profit.
d) Now click Profit under Mark Pane, in the drop button
select line .Further more you need o show in a different way choose Area rather
than line.
viii) Histogram Bar Chart:
Step-1:
Connect the
Retail sales data
Step-2: Open New worksheet and observe
in the left side pane Customer Age converted into Dimension by right click and
select the Convert to dimension in the po-up box. Double Click the Profit.
Step-3: Now right click on the Customer
Age on the LHS pane, select create and then Bin.
Step-4:
After open the
Popup i.e., Edit Bin change the size of bins as 5 and then click Ok. Observe
creation of new Customer Age (Bin).
Step-5:
Drag and drop
Profit into column shelf and Customer Age (Bin) into Row shelf. And swap the
axis you will get histogram.
Step-6: Again, right click on the Customer age (Bin), select edit in the pop-up and then, then create new variable as Age Grouping and select drop in Size in Bin select create new parameter and click Ok, Now in the another popup select allowable values and then click Ok.
Now right click on the bottom Age Grouping select show parameter control in popup then RHS top corner Age Grouping tab appear with 5. If you can change the width, you are getting different histograms with different Class intervals.
Now you need to change colors, just drag and drop profit
into color in Mark Pane. Now the resultant chart represents high profit with
dark color and less profit with light color.
b) Creation of Line Chart: (Retail Sales
data file)
i)
Line Chart – Single axis
Step-1:
Connect the
Sales data
Step-2:
Open new work
sheet, drag and drop Order date into Column shelf and Profit into row shelf.
Then Tableau immediately change the table into chart.
Step-3:
Right click on
Order date and select Continuous. After that you can
select Quarte wise or Month wise etc.,
Step-4: If you need to create line chart for region wise, then drag and drop region into row shelf.
(ii).
Line Chart (Blended Axis)
Step-1:
Open the Tableau
window import the Retail Sales data and connect.
Step-2:
Open new work
sheet, drag and drop Order date into Column shelf and Profit into row shelf.
Then Tableau immediately change the table into chart.
Step-3: Right click on Order date and select Continuous.
Step-5: Let Right click on measures names select edit filters and select which ever you need in the popup box.
Step-1:
Open the Tableau
window import the Retail Sales data and connect.
Step-2:
Open new work
sheet, drag and drop Order date into Column shelf and Profit into row shelf.
Then Tableau immediately change the table into chart.
Step-2: Let double click on Order quantity.
Step-3:
Now right click
on the lower axis and select dual axis on the popup box.
Step-4:
If you need to
show in a different way like Profits in bar. Just click on the Automatic drop
box and select bar.
Step-5:
Suppose you need
to synchronize (Bothe the measures are in the same measure of axis) the both
axis, then right click on the RHS axis and select the synchronize on popup box.
c)
Maps – Filled Maps
Step-1:
Open the Tableau
window import the Retail Sales data and connect.
Step-2:
Open new work
sheet, now double click on states.
Step-3:
Now we add,
sales and right click then select average under measure (sum) in the popup box.
Step-4: Now select Maps under Show Me.
If you need to beautify the map then select colors under mark pane, select edit colors and then select Red Green Gold divergent in the drop button, click apply and then click ok. It is nothing but filled Maps.
Suppose you need to present the average sales in each of the states, just drag and drop the Sales into Label. Also you need to present the symbol of currency, simply right click on the (sales) Profits, select format in the popup box instead of default and made changes.
d) Heat
Maps:
Step-1:
Import the data
set into tableau window (Retail sales) and connect the Orders by drag and drop.
Step-2:
Open the New
Work Sheet. Drag and drop Order Date into rows and Region into columns. Place
the cursor on the Order Date you will see the ‘+’ button, if you will click the
button the data broken up into quarter wise.
Step-3:
Now drag and
drop the ‘sales measure’ from the pane. Now click Automatic and select ‘squares’
then you observe all data points on right pane of Tableau window become as
squares (Equal Size). After that drag and drop sales measure into squares or
double click. Now you observe the shapes sizes as per the Sales
quantity. For visibility you can click and drag.
Step-4: Let you need more visualize the data, just drag and drop the ‘sales measure’ into colors. Also, you need to incorporate profit, just drag and drop the ‘profit measure’ into ‘color’ Marks. For more attractive, click ‘color’ mark, select ‘edit colors’ and then choose red and green divergence in the drop button. Now circles represent Sales and Color represent the Profit.
If you need to improve the sizes, just click ‘size’ under ‘mark’ pane and select suitable size.
e)
Pie Charts
Step-1:
Open the Tableau
window import the Retail Sales data and connect.
Step-2:
Open new work
sheet, now drag and drop the region into row shelf and double click on profit.
Step-3:
Select Pie Chart
from the Show Me. Add filters for better view.
f) Scatter
Plots
Step-1:
Open the Tableau
window import the Retail Sales data and connect.
Step-2:
Open new work
sheet, now double click on profit and sales.
Step-3:
Now you drag and
drop the product category into colors under Mark pane.
For More visualization now drag
and drop the city into detail under Mark Pane.
Step-4: Go to Analyze, apply
trendline.
UNIT-3
Aggregation:
Aggregation is the process of summarizing data at a higher level, such as summing, averaging, or counting values. Tableau automatically aggregates measures in visualizations.
Common Aggregations in Tableau:
SUM () – Adds all values
AVG () – Calculates the average
COUNT () – Counts the number of
values
MIN () / MAX () – Finds the
smallest/largest value
MEDIAN () – Finds the middle value
STDDEV () – Standard deviation
|
Function |
Syntax |
Description |
|
ATTR |
ATTR (expression) |
Returns the value
of the expression if it has a single value for all rows. Otherwise returns an
asterisk. Null values are ignored. |
|
SUM |
SUM (expression) |
Returns the sum
of all values in the expression. SUM can be used with numeric fields only.
Null values are
ignored. |
|
MAX |
MAX (expression) |
Returns the
maximum of an expression across all records. If the expression is a string
value, this function returns the last value where last is defined by
alphabetical order. |
|
MIN |
MIN (expression) |
Returns the
minimum of an expression across all records. If the expression is a string
value, this function returns the first value where first is defined by
alphabetical order. |
|
PERCENTILE |
PERCENTILE (expression, number) |
Returns the
percentile value from the given expression corresponding to the specified number.
The number must be between 0 and 1 (inclusive)—for
example, 0.66 and must be a numeric constant. |
|
AVG |
AVG (expression) |
Returns the
average of all the values in the expression. AVG
can be used with numeric fields only. Null values are ignored. |
|
COLLECT |
COLLECT (spatial) |
An aggregate
calculation that combines the values in the
argument field. Null values are ignored. Note: The COLLECT function can only
be used with spatial fields. Example: COLLECT
([Geometry]) |
|
COUNT |
COUNT (expression) |
Returns the
number of items in a group. Null values are not counted. |
|
COUNTD |
COUNTD (expression) |
Returns the
number of distinct items in a group. Null values are not counted |
|
MEDIAN |
MEDIAN (expression) |
Returns the
median of an expression across all records. Median can only be used with
numeric fields. Null values are ignored. |
|
STDEV |
STDEV (expression) |
Returns the
statistical standard deviation of all values in the given expression based on
a sample of the population. |
|
VAR |
VAR (expression) |
Returns the
statistical variance of all values in the given expression based on a sample
of the population. |
|
COVAR |
COVAR (expression 1, expression2) |
Returns the sample
covariance of two expressions. If expression1
and expression2 are the same— for example, COVAR([profit], [profit])—COVAR returns
a value that indicates how widely values are distributed. COVAR
([Sales], [Profit]) |
|
CORR |
CORR (expression 1, expression2) |
Returns the Pearson correlation
coefficient of two expressions. CORR is available with the following data sources: |
Calculated Field /Values:
Tableau Calculated fields can be
used to create new dimensions such as segments, or new measures such as ratios
or sums. They can be used with any data type, various functions and aggregations,
logical operators, making the calculated results virtually limitless.
There are many reasons for using
calculation fields functionality in Tableau. The below are a few of them:
➢ To use different filters to
remove unwanted results for better analysis
➢ To segment data in new ways
➢ To calculate ratios across
different variables in Tableau, saving database processing and storage
resources.
➢ To convert the data type of a
field, such as converting string to date
➢ To aggregate data.
Types Of Calculations: Calculated Fields in Tableau are
created using calculations. The calculations in tableau can be categorized into
three they are:
### Create Calculated Field:
Step-1: Open the Tableau Window
Step-2: Connect Data file and open new
worksheet.
Step-3: Select the new worksheet and
then Drag and drop the Order date into Row shelf and Profit into Column shelf.
Basic Calculations - String:
It is used to combine two data
sets (string) into one data set. For example, we need to combine Product
Category and Product sub-category in one as New Product Category.
Step-1: Open the Tableau Window
Step-2: Connect Data file (Retail Sales)
and open new worksheet.
Step-3: Drag and drop Product
Category and Product Sub-Category into row shelf.
Step-4: Create New Product Category by
adding two string files as Go to Analysis Select Create New Field and then type
syntax and give name as New Product Category. Now drag and drop this file into
row shelf.
Basic Calculations – Basic
Arithmetic’s i.e., +, -, *, /):
These calculations allow us to transform
values at a data source level of detail or at a visualization level of detail (aggregate
calculation).
Step-1: Open the Tableau Window (Retail
Sales)
Step-2: Connect Data file and open new worksheet.
Step-3: Create new data sheet by using basic arithmetic operations. Firstly, go to Analysis Select Create New Field and then type syntax and give name as Sales Pre Shipping. Now drag and drop this file into row shelf (including Sales, Shipping Costs).
Calculations – Date Function:
Date Function used to know the
laps in days or weeks or months between shipping and order date and also it is
used to change the date format as you like.
Step-1: Open the Tableau Window (Retail
Sales)
Step-2: Connect Data file and open new
worksheet.
Step-3: Create new data sheet by using Date function. Firstly, go to Analysis Select Create New Field and then type syntax and give name as Time to ship. Now drag and drop this file into row shelf (Order date, Shipping date). You can change the day by week or month or quarter to know the delay between order and shipping.
Note: For analysis purpose right click
on Product Name select Sort and then select the Time to Ship and select
Descending in the pop-up box.
Calculation
– Logic Statements
Suppose
you need to do some logic statements like If, Elseif, Then END and so on. Let’s
practice to assign different tax rates to different states using logic
statements.
Step-1: Open the Tableau Window (Retail
Sales)
Step-2: Connect Data file and open new
worksheet.
Step-3: Drag and drop the States into
row shelf and Sales into measures. Now go to Analysis select Create Calculated
Field and then type the syntax then click Apply and then click Ok.
(a) IF [State]='Albania'
THEN 0.04 ELSEIF [State] = 'California' THEN 0.75 ELSEIF [State]='New York'
THEN 0.082 END
Or
(b) CASE
[State]
WHEN
'Alabama' THEN 0.04
WHEN
'California' THEN 0.075
WHEN
‘New York' THEN 0.082
END
Step-4: Drag and drop the Tax Rate into row shelf. Now you see Tax Rate for the applied states.
Note:
If you need to
change the sum to average, place the cursor on Sales right click and then
select average under measures in the popup box. You clearly noticed that the
tax rates for states. (Right click on Tax Rate select Default Properties –
Number format -Percentages under in the pop-up box.
(c).
Hide ‘F’ States
Go to
Analyze, select Create Calculated Field and type the syntax.
IF
[State]='Florida' THEN 'show' ELSE 'hide' END
Table Calculations: These calculations allow us to
transform values at the visualization level of detail only. The choice of
calculation depends on the type and requirements of your analysis.
Table Calculations are powerful
when analyzing trends and patterns within visualizations. They help in
performing dynamic computations without modifying the raw data. Understanding
how to use them efficiently can improve data analysis in Tableau.
Table Calculations – Quick Table
Calculations
Step-1: Open the Tableau window (Sales
Data)
Step-2: Connect data file and
open the new worksheet.
Step-3: Drag and drop Ship date
into column shelf and Order Priority into row shelf.
Now double click on Shipping cost and convert into quarter wise table.
(a)
Running Total Calculation / Differences / Percent differences etc., :
Step-4: Click on the Shipping Cost → Select Quick Table Calculation → Choose Running Total /Difference / Percent Difference etc.,
Running Total
Differences
(b) Date
Aggregation:
Let’s see the data at
aggregate or disaggregate level one can use date aggregation function in
Tableau.
Step-1: Open the Tableau window (Retail
Sales Data)
Step-2: Connect data file and open the
new worksheet.
Step-3: Drag and drop Order date into
column shelf. Now double click on Profit.
By click the ‘+’ button on the Order date you will get quarter wise, Month wise or Day wise. After, go to Analysis, select Aggregate.
Level of Detail Calculations:
Level of Detail (LOD) expressions in Tableau are powerful tools introduced in Tableau 9.0 to compute values at specific levels of granularity, independent of the visualization’s level of detail (Viz LOD). They allow analysts to perform complex calculations by controlling the aggregation level, enabling precise and flexible data analysis.
The third way of creating a
calculating field is by using LOD calculations. Level of Detail (LOD)
expressions in Tableau allow us to control the level at which calculations are
performed, independent of the visualization’s granularity. These calculations
help when you need to calculate aggregates at different levels in the same
view.
Types of LOD Calculations
FIXED – Aggregates data at a
specific level, ignoring filters in the view.
INCLUDE – Aggregates data at a
lower level by including additional dimensions.
EXCLUDE – Removes certain
dimensions from the calculation.
1. FIXED LOD Calculations
Suppose we want to calculate the
total sales per region, regardless of the filters applied.
Step-1: Open Tableau and connect
to dataset (e.g., Retail Sales).
Step-2: Drag and drop Region into
row shelf. Go to Analysis → Click Create Calculated Field. (Rename as LOD-FIXED-Avg
Sales)
Enter the Syntax
{FIXED
[Region] : AVG([Sales])}
Step-3: Click OK and drag (Double
click) LOD-FIXED-Avg Sales field to the view.
Step-4: Drag Product Category to
Rows and check the result.
Step-5: If you need to know the
Regional Product Category Performance, go to analyze then create new Created
calcinated field (Regional Product Category Performance) by enter the syntax
and double click.
AVG([Sales])-SUM([LOD-Fixed-Avg
Sales])
Suppose we want to calculate the
average sales per Customer but still allow the visualization to change at
different levels.
Step-1: Open Tableau and connect
to dataset (e.g., Sales).
Step-2: Go to Analysis → Click Create Calculated Field. (Rename as
New Sales)
Enter the formula
{ INCLUDE
[Customer Name] : AVG([Sales]) }
[If the Customer Names are more than 1000, select some of them.]
Step-3: Click OK and drag Nes
Sales field to the view.
Step-4: Drag Customer to Rows and
check the result.
3. EXCLUDE LOD Calculations
Suppose we want to calculate the
sum of sales at the State level but exclude City from the calculation.
Step-1: Open Tableau and connect
to dataset (e.g., Sales).
Step-2: Go to Analysis → Click Create Calculated Field. (Rename as
New Sales)
Enter the formula
{
EXCLUDE [City] : SUM([Sales]) }
Step-3: Click OK and drag New
Sales field to the view.
Step-4: Drag State to Rows and
check the result.

UNIT-4
Creating a Standard Map View:
A standard map view is used to
visualize geographic data (e.g., sales by region, population distribution)
without requiring latitude/longitude values.
Steps to Create a Standard Map
View:
Step-1: Open the Tableau window import
the Retail Sales data and connect.
Step-2: Open new work sheet, now double
click on states.
Step-3: Now we add, sales and right click
then select average under measure (sum) in the popup box.
Step-4: Now select Maps under Show Me.
If you need to beautify the map
then select colors under mark pane, select edit colors and then select Red Gold
Green divergent in the drop button, click apply and then click ok.
If you need to Profit also in the Sales view drag and drop the profits into sizes under Marks view. You will see red color with low values and green color with high values state wise.
Plotting Custom Locations on a Map:
This feature is useful when
standard geographic fields (city, state) are not available and you need to plot
locations using latitude and longitude.
Steps to Plot Custom Locations:
Step-1: Open the Tableau window.
Connect the data (Indian cities)
Step-2: Drag Longitude to the
Columns shelf. Latitude to the Rows shelf.
Step-3: Convert to a Map View. Change
the Marks type to Circle.
Step-4: Enhance the Visualization
- Drag
city Name to Label to show city names.
- Drag
Sales to Color to represent performance.
Replacing Tableau’s Standard Maps:
To improve map aesthetics by
replacing Tableau’s default background maps with custom Map box, WMS, or
shapefiles.
Steps to Replace Tableau Maps
with Mapbox:
- Go to Map → Background Maps → Map Services
- Select
Add → Mapbox Maps / WMS Maps
- Sign
up at Mapbox.com and get an API key.
- Choose
a Map Style
- Options
include Satellite, Street, Light, Dark, Custom Themes.
- Apply
and Customize
- Adjust
color schemes, layers, and labels for better visualization.
Shaping Data
for Point-to-Point Mapping
To visualize connections between two
locations (e.g., airline routes, delivery routes, migration paths). Steps to
Create a Point-to-Point Map:
1.
Load the Dataset
o Ensure
your dataset has origin and destination latitude/longitude values.
2.
Create Dual Axis Map
o Drag
Longitude to Columns (twice) to create two map layers.
o Drag
Latitude to Rows.
o Right-click
the second Longitude axis → Select Dual Axis.
3.
Plot Start and End Points:
o On
the first layer, set the Marks type to Circle (for locations).
o On
the second layer, set Marks type to Line (for routes).
o Drag
Route ID to the Path shelf to connect points.
4.
Enhance the Visualization
o Drag
Distance to Size (thicker lines for longer routes).
o
Use Color to differentiate routes.
Generating
New Data with Forecasts:
Generating data with forecasts in
Tableau involves using its built-in forecasting tools to predict future trends
based on historical data. Forecasting
in Tableau uses historical data to predict future values using time series
analysis. Tableau primarily uses Exponential Smoothing Models for forecasting.
Requirements:
§ At
least one date field (e.g., daily, monthly) to define the time dimension.
§ At
least one measure (e.g., sales, profit) for forecasting.
§ Ensure
data is clean, with no missing values in the date or measure fields for
accurate forecasts.
§ Aggregate
data if needed (e.g., sum sales by month).
Steps to generate Forecasts in Tableau:
Step-1:
Connect to data
source (Excel, SQL, cloud databases, etc.) (Retail Sales)
Ensure that
historical data points (e.g., 12+ months for monthly data) for reliable
forecasts.
Step-2:
Drag and drop the
date field to Columns (Ship date)) and the measure (Sales/Profits) to Rows. And
use continuous rather than discrete for smoother forecasting.
Step-3: Apply filters to focus on relevant data (e.g., specific regions or products). Use parameters for dynamic control (e.g., adjust forecast periods).
Step-4: Right click on the visualization
/ go to analytics Pane / go to Analysis and select Forecast Options.
Forecast Length: Set how far into the future to
predict (e.g., 6 months).
Source Data: Choose whether to include all
data or a specific range.
Model Type:
Automatic: Tableau selects the best model
(usually exponential smoothing).
Custom: Adjust seasonality (e.g.,
yearly, quarterly) or model specifics.
Confidence
Intervals:
Default is 95%; adjust for wider/narrower uncertainty bands.
Step-5: Forecasted values appear as a continuation
of the historical line, often in a different shade. Confidence intervals show
the range of uncertainty (shaded bands).
# If you need to add trend line
(linear, polynomial, power or exponential etc.,) from Analytica pane to
visualize the overall direction
# If you need quality metrics
(RMSE, MASE) by selecting describe forecast by right click and select.
Parameters
Parameters are dynamic values
that can replace constant values in calculations, filters, reference lines, and
more. They allow users to interact with the visualization by inputting or
selecting values.
Important Features
Single
value at a time
Unlike filters, parameters can only hold one value at a time.
Static
list
Parameter values are not automatically updated based on data source; they need
to be manually updated if data changes.
User
Interaction
Users can choose values via dropdowns, sliders, type-ins, etc.
Works
across multiple sheets
One parameter can be used in multiple worksheets/dashboards.
Creating
of Parameter:
Step-1: Connect the data file to Tableau
(Retail Sales)
Step-2: Right-click in the Data pane → Select Create Parameter…
Give the parameter a name (Analysis
By (Dimension Swap) → Set data type (Integer, Float, Date, String, etc.) (String)
→ Set current value (default value) (1) → Set allowable values (All,
List, Range) (List).
Step-3: After choosing the List, choose
one by one from the data pane what ever you need. (Here we consider string so
take Customer Name)
Value: Customer Name Display
As: Customer Name
Value: Customer Segment Display As: Customer Segment
Step-4: After Creating Parameter, right
click and select show parameter. You see RHS Pane i.e., created parameter.
Step-5: After
that go to Analyze → Create Calculated Field → Give the name as Analysis By in
the pop-up box and type the syntax as follows:
CASE [Analysis By (Dimension
Swap)]
WHEN
'Customer Name' THEN [Customer Name]
WHEN
'Customer Segment' THEN [Customer Segment]
END
Providing
Self-Evidence Adhoc Analysis with Parameters
Self-evident ad hoc analysis in
Tableau using parameters empowers users to interactively explore data without
needing predefined dashboards or complex setups. Parameters enable dynamic,
user-driven analysis by allowing inputs to adjust calculations, filters, or
visualizations on the fly.
It explores the analysis where
users can independently explore data, adjust variables, and derive insights
through intuitive, interactive controls without requiring deep technical
knowledge. Parameters act as user-controlled inputs (e.g., sliders, dropdowns)
to modify metrics, filters, or views dynamically, making analysis self-evident
and accessible.
Suppose user wants to explore
(e.g., sales performance, customer segmentation, forecasting) follow the steps.
Creating
of Parameter:
Step-1: Connect the data file to Tableau
(Retail Sales)
Step-2: Right-click in the Data pane →
Select Create Parameter…
Give the parameter a name (Analysis
By (Dimension Swap) → Set data type (Integer, Float, Date, String, etc.) (String)
→ Set current value (default value) (1) → Set allowable values (All,
List, Range) (List).
Step-3: After choosing the List, choose
one by one from the data pane whatever you need. (Here we consider string so
take Customer Name)
Value: Customer Name Display
As: Customer Name
Value: Customer Segment Display As: Customer Segment
Value: Product Category Display As: Product Category
Value: Product Sub-category Display As: Product Category
Value: Product Container Display As: Product Container
Value: Product Name Display As: Product Name
Value: Region Display As: Region
Value: Ship mode Display As: Ship mode
Step-4: After Creating Parameter, right
click and select show parameter. You see RHS Pane i.e., created parameter.
Step-5: Integrate Parameters into Calculations, Create calculated fields to use parameter values dynamically.
Go to Analyze → Create Calculated
Field → Give the name as Analysis By in the pop-up box and type the syntax as
follows:
CASE [Analysis By (Dimension
Swap)]
WHEN
'Customer Name' THEN [Customer Name]
WHEN
'Customer Segment' THEN [Customer Segment]
END
Step-6: Build Interactive Visualizations
– Use calculated fields in charts, tables or maps and add the parameters to the
dashboard for user interaction.
Editing views in Tableau Server:
Editing views on Tableau Server
(now part of Tableau Cloud or Tableau Server for on-premises deployments)
allows authorized users to modify published workbooks, views, or dashboards
directly in the web interface without needing Tableau Desktop.
The Purpose of Web editing is it
enables users to tweak visualizations, create new views, or adjust dashboards
interactively in a browser. It accesses Tableau Server/Tableau Cloud via the
Web Edit feature. The scope is Users can modify calculations, filters,
parameters, layouts, and formatting, depending on permissions.
Requirements:
1. Permissions:
- Users
need Editor or Explorer (can publish) site roles to edit
workbooks.
- Specific
permissions: Web Edit capability for the project/workbook and Write/Save
to save changes.
- Admins
control permissions at the project, workbook, or view level.
2. License:
- Requires
a Creator or Explorer license (Explorer with editing permissions enabled).
3. Browser Support:
- Works
in modern browsers (Chrome, Firefox, Safari, Edge).
4. Published Workbook:
- The
workbook must be published to Tableau Server/Cloud with web editing
enabled.
How
to Edit Views on Tableau Server
- Accessing
Web Edit:
- Navigate
to the workbook or view on Tableau Server.
- Click
the Edit button (pencil icon) on a view or dashboard (visible if permissions
allow).
- Alternatively,
select Edit Workbook from the workbook’s menu.
- Editing
Interface:
- Opens
a browser-based version of Tableau’s authoring environment, similar to
Tableau Desktop.
- Components
available:
- Data
Pane: Shows data sources and fields.
- Shelves:
Rows, Columns, Filters, Marks, etc.
- Toolbar:
Undo, Redo, Save, Add New Worksheet/Dashboard.
- Analytics
Pane: Reference lines, trend lines, etc.
- Common
Editing Tasks:
- Modify
Visualizations:
- Drag
fields to shelves to change chart types (e.g., bar to line).
- Adjust
marks (color, size, label).
- Filters:
- Add,
edit, or remove filters.
- Create
quick filters for interactivity.
- Calculations:
- Create
or edit calculated fields (e.g., SUM([Sales]) / [Select Metric
Parameter]).
- Parameters:
- Edit
existing parameters or create new ones to drive dynamic analysis.
- Formatting:
- Adjust
titles, fonts, colors, or tooltips.
- Modify
dashboard layouts (e.g., rearrange tiles, add text objects).
- Add
Sheets/Dashboards:
- Create
new worksheets or dashboards within the workbook.
- Saving
Changes:
- Click
Save to overwrite the original workbook (if permitted).
- Use
Save As to create a copy (requires Publish permissions).
- Note:
Saving may overwrite shared content—communicate with team members.
Using
Parameters in Web Editing
1. Editing Parameters:
- Access
parameters in the Data pane.
- Modify
allowable values, range, or current value.
- Update
parameter-driven calculations or filters.
- Dynamic
Analysis:
- Combine
parameters with web-edited calculations for ad hoc analysis (e.g., adjust
a threshold to filter data).
- Example:
Edit a parameter “Select Year” to update a view dynamically.
- Adding
Parameters:
- Create
new parameters directly in the web interface to enhance interactivity.
- Example:
Add a “Top N” parameter to control the number of items displayed.
Limitations
of Web Editing
1. Data Source Restrictions:
- Cannot
modify the underlying data source structure (e.g., add new connections,
edit joins).
- Limited
to published data sources or extracts.
- Advanced
Features:
- Some
Desktop features are unavailable (e.g., custom SQL, complex data
blending).
- No
access to certain extensions or advanced scripting (e.g., Python/R
integration).
- Performance:
- Large
datasets may slow down web editing.
- Extracts
refresh schedules cannot be modified in web edit mode.
- Version
Control:
- No
built-in version history for web edits (use Save As for backups).
- Parameter
Limitations:
- Cannot
dynamically update parameter lists based on data changes (manual updates
required).
- Single-value
selection only (no multi-select).
@@@


























Comments
Post a Comment