Tableau For Data Analytics
Tableau For Data Analytics
1. Introduction to Tableau:
ANJIRAJU
• The results of these queries are transformed into visualizations that are sent
back to the Tableau interface.
e. Data Engine
• Tableau’s Hyper Data Engine powers its data processing and storage
capabilities.
• This in-memory engine enables fast analytical computations, supports data
extracts, and handles large datasets effectively.
f. Client Layer
The client layer is where users interact with Tableau through its various interfaces:
1. Tableau Desktop: A desktop-based application for building visualizations and
dashboards.
2. Tableau Server/Online: A web-based platform for collaboration and sharing of
Tableau workbooks and dashboards.
3. Tableau Mobile: For accessing dashboards and analytics on mobile devices.
4. Tableau Public: Free version for publishing visualizations online.
Diagram Representation
At a high level, Tableau's architecture consists of:
1. Data Sources → 2. Data Connectors → 3. VizQL Server → 4. Application Server
→ 5. Client Layer
Role of Tableau
Tableau is a leading data visualization and business intelligence tool that plays a
significant role in the data analytics ecosystem. It enhances the analytical process by
supporting descriptive, diagnostic, and predictive analytics while integrating seamlessly
with other tools and technologies.
ANJIRAJU
Use Data Interpreter for:
• Cleaning Excel or CSV files with messy headers or extra metadata.
• Handling files where data is buried under titles, notes, or blank rows.
• Automatically identifying and excluding unnecessary information (e.g.,
subtotals, footnotes).
Features of Data Interpreter
• Header Detection: Automatically identifies and uses the correct row as
headers.
• Removes Extra Information: Cleans up extraneous details like blank rows,
merged cells, and summaries.
• Prepares Pivot Tables: Flattens pivot tables into usable tabular formats.
How to Use Data Interpreter
1. Connect Your File: Import an Excel or CSV file into Tableau.
2. Enable Data Interpreter: After loading the file, Tableau will prompt you to use
the Data Interpreter if it detects inconsistencies. Click "Use Data Interpreter."
3. Review Results: Tableau generates a cleaned dataset and a "cleaning report"
that shows what changes were made.
Limitations
• Only supports structured, tabular datasets (like Excel or CSV).
• Limited to basic cleaning tasks (e.g., fixing headers, removing extra rows).
2. Tableau Prep
Tableau Prep is a standalone tool for advanced and complex data cleaning, transformation,
and preparation tasks. It allows users to visualize and manipulate data at a granular level.
• Advanced cleaning, such as handling null values, aggregations, and calculated fields.
ANJIRAJU
• Data Profiling: Shows summaries and distributions of data fields for better
understanding.
• Joins and Unions: Allows merging multiple datasets using joins or unions.
• Custom Cleaning Steps: Supports calculated fields, grouping, splitting, and pivoting.
• Reusable Flows: Save workflows for future use, making recurring tasks efficient.
1. Connect to Data: Import data from various sources (databases, files, APIs).
2. Build a Flow: Use the drag-and-drop interface to apply cleaning and transformation
steps.
3. Preview and Validate: Tableau Prep provides real-time feedback on data changes.
4. Export Clean Data: Save the output as a Tableau Data Extract (.hyper) or publish
directly to Tableau Server or Tableau Online.
ANJIRAJU
• The blend happens at the aggregate level; Tableau queries the data sources
independently and merges the results based on the common field.
• Secondary data fields appear as a gray link icon in the Dimensions or Measures
pane, indicating they are linked to the primary source.
Use Cases
• Combining data from heterogeneous sources (e.g., a SQL database and an
Excel file).
• Situations where direct joins aren't possible because data resides in different
databases.
• When you want to retain the independence of datasets while combining their
outputs.
Example
• A company has sales data in a SQL database and target data in an Excel sheet.
• You want to visualize the comparison of actual vs. target sales, blending them on
a common field like Region.
2. Joins
Definition
A join is a method for combining data from two or more tables within the same data
source. Joins create a single, unified table by combining rows based on a common key.
How It Works
• Joins are defined in Tableau's Data Source tab before visualization.
• You can choose from the following join types:
o Inner Join: Includes only matching rows between the tables.
o Left Join: Includes all rows from the left table and matching rows from the
right table.
o Right Join: Includes all rows from the right table and matching rows from
the left table.
o Full Outer Join: Includes all rows from both tables, filling gaps with nulls
where matches are missing.
Use Cases
• Combining tables within the same database or data source.
• Scenarios where relationships are well-defined, and a single, unified dataset is
required for analysis.
ANJIRAJU
• When you need detailed, row-level combinations of data for calculations or
aggregations.
Example
• A company has customer details in one table and purchase records in another,
both in the same SQL database.
• You can join them on Customer ID to analyze purchase trends by customer
demographics.
Example Scenario
• Data Blending: A retailer tracks sales in a database and marketing expenses in
Google Sheets. They blend the data to understand the correlation between
marketing spend and regional sales.
• Joins: The retailer combines product details and sales transactions from the
same SQL database to analyze product-wise revenue.
ANJIRAJU
1. Pivoting Data in Tableau Desktop
Scenario
You have data in a wide format, such as columns for each month, and you want to pivot
it into a long format with a single column for months and another for values.
Steps to Pivot Data
1. Connect Your Data:
o Import your dataset (e.g., Excel, CSV) into Tableau Desktop.
2. Select Columns to Pivot:
o Go to the Data Source tab.
o Select the columns you want to pivot (e.g., January, February, March).
3. Pivot the Data:
o Right-click on the selected columns and choose Pivot.
o Tableau creates two new columns:
▪ Pivot Field Names: Contains the original column names (e.g.,
months).
▪ Pivot Field Values: Contains the corresponding values.
4. Rename the Pivot Columns:
o Rename Pivot Field Names to something like Month.
o Rename Pivot Field Values to something like Sales.
ANJIRAJU
o Load your dataset into Tableau Prep Builder.
2. Add a Pivot Step:
o Drag a Pivot step into the flow.
o Use the Pivot configuration to move data from rows to columns.
3. Configure Pivot Fields:
o Drag the field you want to expand (e.g., Month) into the Rows to Columns
pane.
o Tableau Prep will create new columns for each unique value in the
selected field.
4. Output the Data:
o Save the reshaped data as a Tableau Data Extract (.hyper) or export to a
file.
3. Handling Null Values
Identifying Null Values:
1. In Tableau Desktop, go to the worksheet.
2. Drag fields into the view and look for null markers.
Replacing Null Values:
1. Using Calculated Fields:
o Create a calculated field to replace null values:
Example
IFNULL([Field], "Default Value")
2. Filter Out Nulls:
o Drag the field with nulls to the Filters pane.
o Exclude null values.
3. Use the Data Pane:
o Right-click on a field in the Data Source tab.
o Choose Replace Nulls or apply filters to exclude unwanted rows.
4. Filtering Unnecessary Fields
Steps:
1. In the Data Source Tab:
ANJIRAJU
o Uncheck fields that are irrelevant for your analysis (e.g., metadata
columns, IDs not needed for aggregation).
2. In the Worksheet:
o Drag unnecessary fields to the Filters shelf and exclude them.
o Use the Exclude option in the right-click menu for specific data points.
3. Using Tableau Prep:
o Add a Clean Step to your flow.
o Deselect fields you don’t need.
3. Tableau Basics:
ANJIRAJU
1. Data Pane
The Data Pane is where you access all the data fields you’ve connected to in Tableau.
It’s located on the left side of the workspace and serves as the starting point for building
visualizations.
Key Features:
• Dimensions: Contains categorical data (e.g., Region, Product, Customer Name)
that you can use to group or categorize data.
• Measures: Contains numerical data (e.g., Sales, Profit, Quantity) that you can
aggregate (e.g., sum, average).
• Hierarchies: Allows grouping related fields into hierarchies (e.g., Year > Quarter
> Month).
• Calculated Fields: Create custom fields using Tableau’s formula editor.
• Sets and Groups: Define subsets or groupings of data for further analysis.
• Parameters: Provide user-controlled input for dynamic visualizations.
2. Rows and Columns Shelves
The Rows and Columns shelves are located at the top of the workspace and define the
structure of your visualization.
Rows Shelf:
• Fields placed here determine the rows in your visualization.
• Example: Dragging Region to Rows creates a row for each unique region.
Columns Shelf:
• Fields placed here determine the columns in your visualization.
• Example: Dragging Year to Columns creates a column for each year.
Key Features:
• You can drag multiple fields to Rows or Columns to create grids, tables, or more
complex visualizations.
• Tableau automatically aggregates measures when placed in Rows or Columns
(e.g., SUM, AVG).
3. Marks Card
The Marks Card is a central control panel for customizing the appearance and
interactivity of your visualization. It is located to the left of the visualization area.
ANJIRAJU
Key Features:
• Drop Zones: Fields can be dragged into specific areas such as:
o Color: Assigns color to marks based on the field values.
o Size: Controls the size of the marks.
o Label: Displays field values as labels on the marks.
o Detail: Adds dimensions or measures for more granularity without
affecting the visualization structure.
o Tooltip: Includes information that appears when hovering over a mark.
• Mark Type Selector: Choose from mark types like bars, lines, shapes, or text.
Example Usage:
• Dragging Region to Color and Sales to Size creates a bubble chart where bubble
size represents sales and color differentiates regions.
4. Visualization Area
The Visualization Area (also called the Canvas) is where Tableau displays your chart,
table, or other visualizations. It provides a real-time view of the data as you build.
Key Features:
• Interactive Visualizations: Users can interact with visualizations (e.g., filter,
drill-down).
• Auto-Generated Titles: Tableau provides default titles, which you can
customize.
• Drag-and-Drop Functionality: Fields from the Data Pane can be directly
dropped onto the visualization.
• Quick Filters: Add interactive filters to refine displayed data dynamically.
5. Filters Shelf
The Filters Shelf, located on the right side of Rows and Columns shelves, allows you to
restrict the data shown in your visualization.
Key Features:
• Apply filters to dimensions (e.g., specific regions) or measures (e.g., sales
greater than $1,000).
• Filters can be interactive (e.g., displayed as dropdowns or sliders).
• Filter options include range, top N, wildcard, and condition-based filtering.
ANJIRAJU
6. Pages Shelf
The Pages Shelf, found above the Visualization Area, is used to create animations or
break down visualizations into smaller parts for detailed analysis.
Key Features:
• Example: Dragging Year to Pages creates one visualization per year, allowing you
to cycle through time-series data.
7. Toolbar
The Toolbar is located at the top of the interface and provides quick access to
commonly used tools.
Key Features:
• Undo/Redo actions.
• Format the visualization.
• Show/hide gridlines and headers.
• Export the visualization to an image or PDF.
8. Show Me Panel
The Show Me Panel is located in the top-right corner and suggests visualization types
based on the data fields selected.
Key Features:
• Displays available chart types like bar charts, line graphs, scatter plots,
heatmaps, and more.
• Recommendations depend on the combination of dimensions and measures
you’ve selected.
9. Sheets and Dashboards
Tableau uses a tabbed interface to organize your work.
Sheets:
• Individual visualizations are created in sheets.
• Each sheet represents a single chart, graph, or table.
Dashboards:
• Combine multiple sheets into a single view.
• Add interactivity and arrange visualizations for storytelling
ANJIRAJU
Dimensions vs. Measures in Tableau
In Tableau, dimensions and measures are the fundamental building blocks for
structuring and visualizing data. Understanding their differences and how they interact
with discrete and continuous fields is crucial for creating effective visualizations.
1. Dimensions
Definition
• Dimensions are categorical fields used to slice, group, and categorize data.
• They contain qualitative information such as names, dates, or categories.
• Dimensions define the context of your data.
Key Characteristics
• Typically discrete (though they can also be continuous).
• Used to segment or break down measures (e.g., Sales by Region).
• Displayed as headers or labels in visualizations.
Examples of Dimensions
• Region (e.g., North, South, East, West).
• Product Category (e.g., Electronics, Furniture).
• Order Date (used in both discrete and continuous formats).
Implications for Chart Types
• Bar charts: Dimensions define categories on the x-axis (e.g., sales by region).
• Line charts: When continuous, dimensions like dates create a time series on the
x-axis.
2. Measures
Definition
• Measures are numerical fields that can be aggregated (e.g., sum, average, min,
max).
• They provide quantitative data for analysis.
Key Characteristics
• Always continuous by default, but can be treated as discrete.
• Displayed as axes in visualizations.
• Can be aggregated (e.g., SUM, AVG, COUNT).
Examples of Measures
ANJIRAJU
• Sales (e.g., $10,000).
• Profit (e.g., $2,500).
• Quantity (e.g., 15 items).
Implications for Chart Types
• Bar charts: Measures define the height or length of bars.
• Line charts: Measures determine the y-axis values.
3. Discrete vs. Continuous Fields
Discrete Fields
• Represent distinct, separate values.
• Displayed as labels or categories.
• Shown as blue pills in Tableau.
Continuous Fields
• Represent values along a range.
• Displayed as axes with a range of values.
• Shown as green pills in Tableau.
ANJIRAJU
• Scatter Plot:
o Uses continuous measures on both axes for detailed relationships (e.g.,
Sales vs. Profit).
• Heatmap:
o Discrete dimensions (e.g., Product Category, Region) define rows and
columns.
o Continuous measures (e.g., Sales) determine color intensity.
5. Interactivity and Filters
• Dimensions:
o Often used for filters to create categories or subsets (e.g., filter by Region
or Product Category).
o Discrete filters let users select specific categories (e.g., select East or
West).
• Measures:
o Used to apply numeric filters (e.g., show Sales > $5,000).
o Can also enable dynamic calculations (e.g., filter top 10 products by
Profit).
6. Combining Dimensions and Measures
Tableau’s flexibility allows dimensions and measures to work together to create
meaningful visualizations:
Example 1: Sales by Region
• Dimension: Region (discrete) defines the categories on the x-axis.
• Measure: Sales (continuous) defines the bar height.
Example 2: Monthly Profit Trend
• Dimension: Order Date (continuous) defines the time series on the x-axis.
• Measure: Profit (continuous) defines the trend line on the y-axis.
Example 3: Regional Sales Heatmap
• Dimension: Region and Product Category (both discrete) define rows and
columns.
• Measure: Sales (continuous) defines the color intensity.
ANJIRAJU
Filters and Hierarchies
Filters and hierarchies are essential tools in Tableau for refining data and enhancing
interactivity. Filters allow you to narrow down your data, while hierarchies enable drill-
down analysis.
1. Filters in Tableau
Filters are used to restrict the data displayed in a visualization. Tableau offers multiple
types of filters, each with its specific purpose and functionality.
Types of Filters
1. Extract Filters
o Applied when creating a data extract from a data source.
o Filters out data before it’s imported into Tableau, reducing the extract size
and improving performance.
o Example: Only include data for 2023 when creating an extract.
2. Data Source Filters
o Applied at the data source level and affect all visualizations in the
workbook.
o Useful for implementing security or restricting sensitive data.
o Example: Apply a filter to exclude confidential regions.
3. Context Filters
o Applied before other filters and establish a context for subsequent filters.
o Useful when dependent filters are needed (e.g., filter products within a
specific region).
o Example: Set Region = East as a context filter, so the Product filter only
applies to products in the East.
4. Dimension Filters
o Filters based on discrete fields (e.g., categories like Region, Product).
o You can include/exclude specific categories or use wildcard matches.
o Example: Exclude the South region from the analysis.
5. Measure Filters
o Filters based on continuous fields (e.g., Sales, Profit).
o You can filter by ranges, thresholds, or conditions.
ANJIRAJU
o Example: Show only data where Sales > 10,000.
6. Table Calculation Filters
o Filters applied to calculated fields based on table calculations.
o Operate after other filters, impacting visualized data without changing the
underlying data.
o Example: Filter out the top 10 customers by sales.
Dynamic Filters
Dynamic filters allow for interactivity by updating the data displayed based on user
selections.
• Using Parameters:
o Create a parameter for user input (e.g., Year or Region).
o Link the parameter to a calculated field or filter to dynamically update
visualizations.
o Example: A dropdown to select a year, dynamically filtering data for that
year.
• Interactive Filters:
o Drag a field to the Filters shelf, then display it as an interactive filter on the
dashboard.
o Users can select categories or ranges in real-time.
2. Filter Order of Operations
Understanding the order of operations is critical to ensure filters behave as expected:
1. Extract Filters
2. Data Source Filters
3. Context Filters
4. Dimension Filters
5. Measure Filters
6. Table Calculation Filters
Example:
If you use a context filter to limit data to a single region, other filters (e.g., top 10
customers by sales) will apply only to that region.
ANJIRAJU
3. Hierarchies in Tableau
Hierarchies allow users to drill down into data at varying levels of granularity, enabling
deeper analysis within a single visualization.
Creating Hierarchies
1. Identify Related Fields:
o Choose fields with a logical relationship (e.g., Year > Quarter > Month or
Region > State > City).
2. Create the Hierarchy:
o Drag one field onto another in the Data Pane.
o Tableau prompts you to create a hierarchy. Name it appropriately.
o Add additional fields to the hierarchy as needed.
3. Using Hierarchies in Visualizations:
o Drag the hierarchy to the Rows or Columns shelf.
o Use the + and – icons in the visualization to drill down or roll up.
ANJIRAJU
o Context Filter: Limit data to the East region.
o Dynamic Filter: Use a dropdown to select a specific state.
o Measure Filter: Show cities with sales greater than $10,000.
Result: An interactive visualization where users can drill down from Region to City, with
filters dynamically adjusting the displayed data.
5. Practical Tips for Filters and Hierarchies
• Filter Optimization:
o Use extract filters for performance improvements in large datasets.
o Limit the use of context filters as they can slow performance when used
excessively.
• Hierarchy Best Practices:
o Create hierarchies for fields commonly used together.
o Combine hierarchies with interactive filters for a better user experience.
6. Example Use Case
Dashboard Overview:
• Hierarchy:
o Year > Quarter > Month for sales trends.
o Region > State > City for geographic analysis.
• Filters:
o Year filter as a context filter.
o Sales range filter to focus on high-value transactions.
o Interactive filter for product categories.
• Outcome:
Users can explore sales trends over time, drill down into specific regions, and
dynamically adjust the data shown.
ANJIRAJU
1. Bar Charts
Purpose:
• Compare categories or groups.
• Suitable for dimensions (e.g., Region) and measures (e.g., Sales).
Steps to Create a Bar Chart:
1. Drag a dimension (e.g., Region) to the Rows shelf.
2. Drag a measure (e.g., Sales) to the Columns shelf.
3. Tableau will generate a horizontal bar chart by default.
4. Use the Marks Card to customize:
o Drag another field (e.g., Category) to Color for grouped bars.
o Drag a field to Label to display values on bars.
Best Practices:
• Use consistent colors to avoid confusion unless highlighting differences.
• Sort bars in descending order for better readability.
• Avoid using too many categories (limit to 8-10).
Example Use Case:
• Compare Sales across Regions to identify top-performing areas.
2. Line Charts
Purpose:
• Show trends over time.
• Suitable for continuous dimensions (e.g., Order Date) and measures (e.g., Profit).
Steps to Create a Line Chart:
1. Drag a date field (e.g., Order Date) to the Columns shelf.
o Tableau defaults to a continuous time axis.
2. Drag a measure (e.g., Sales) to the Rows shelf.
3. Tableau creates a line chart automatically.
4. Use the Marks Card to customize:
ANJIRAJU
o Drag a field (e.g., Region) to Color for multiple trend lines.
o Add Category to Detail to segment trends.
Best Practices:
• Use a continuous time axis for trends (e.g., monthly, quarterly).
• Avoid cluttering with too many lines; group or filter data when necessary.
• Highlight significant trends using annotations or reference lines.
Example Use Case:
• Track monthly Sales trends to identify seasonality.
3. Scatter Plots
Purpose:
• Show relationships between two continuous measures.
• Identify clusters, correlations, or outliers.
Steps to Create a Scatter Plot:
1. Drag a measure (e.g., Sales) to the Columns shelf.
2. Drag another measure (e.g., Profit) to the Rows shelf.
3. Tableau generates a scatter plot automatically.
4. Use the Marks Card to enhance:
o Drag a dimension (e.g., Category) to Color for grouping.
o Add Region to Detail to display points for each region.
Best Practices:
• Add a trend line to show correlation or lack thereof.
• Use appropriate scaling on axes to ensure clarity.
• Highlight specific clusters or outliers for emphasis.
Example Use Case:
• Explore the relationship between Sales and Profit across product categories.
4. Pie Charts
Purpose:
• Represent parts of a whole.
ANJIRAJU
• Suitable for a single measure split by a few categories.
Steps to Create a Pie Chart:
1. Drag a measure (e.g., Sales) to the Rows shelf.
2. Drag a dimension (e.g., Region) to the Color on the Marks Card.
3. On the Marks Card, change the mark type to Pie.
4. Drag the same measure (Sales) to Size to scale slices proportionally.
5. Add a field (e.g., Region) to Label to show category names and values.
Best Practices:
• Limit categories to 3-5 slices for readability.
• Avoid pie charts if differences between slices are subtle; consider a bar chart
instead.
• Ensure slice sizes are proportional to the data values.
Example Use Case:
• Show the percentage contribution of Sales by Region.
Advanced Options
1. Dual-Axis Charts
Purpose:
• A dual-axis chart allows you to plot two different measures on the same
visualization but with separate y-axes. This is useful when comparing two
measures that have different units or scales.
Steps to Create a Dual-Axis Chart:
1. Step 1: Drag a dimension (e.g., Order Date) to the Columns shelf.
2. Step 2: Drag the first measure (e.g., Sales) to the Rows shelf.
ANJIRAJU
3. Step 3: Drag the second measure (e.g., Profit) to the same Rows shelf.
o Tableau automatically creates a new axis for the second measure.
4. Step 4: Click on the second axis on the visualization and select Dual Axis from
the dropdown in the axis header.
5. Step 5: Adjust the Marks Card to customize each axis. You can change the mark
type for each measure (e.g., bars for Sales, line for Profit).
6. Step 6: Synchronize axes (if applicable) to ensure both axes align for
comparison (explained below).
2. Combo Charts
Purpose:
• A combo chart combines two different chart types (e.g., bars and lines) in a
single view. It’s helpful when comparing two different measures, like a
categorical measure (bars) and a continuous measure (line).
Steps to Create a Combo Chart:
1. Step 1: Drag a dimension (e.g., Region) to the Columns shelf.
2. Step 2: Drag the first measure (e.g., Sales) to the Rows shelf.
3. Step 3: Drag the second measure (e.g., Profit) to the same Rows shelf.
4. Step 4: By default, Tableau will create two separate axes. Right-click on one of
the axes and select Dual Axis.
5. Step 5: In the Marks Card, you can change the mark type for each measure:
o For the first measure (e.g., Sales), use Bar.
o For the second measure (e.g., Profit), use Line.
6. Step 6: Adjust formatting, color, and labels to differentiate the two measures.
3. Synchronized Axes
Purpose:
• Synchronized axes are used in dual-axis charts to ensure that both axes have
the same scale, allowing for direct comparison between two different measures.
It’s particularly useful when the measures you’re comparing are on different
scales but need to be viewed side-by-side.
Steps to Synchronize Axes:
1. Step 1: Create a dual-axis chart by dragging two measures to the same axis (as
described above).
2. Step 2: Right-click on one of the axes and select Synchronize Axis.
ANJIRAJU
o This ensures both axes are aligned on the same scale, which is
particularly helpful when comparing two measures that have different
ranges (e.g., Sales in thousands vs. Profit in millions).
3. Step 3: Fine-tune any labels, titles, or tick marks to ensure that the visualization
remains clear after synchronization.
Visualizing Data with Dual-Axis and Combo Charts: Examples
1. Dual-Axis Example:
o Purpose: Compare monthly sales and profit trends.
o Visual Type: Line for Sales and bar for Profit.
o Result: The line shows the overall sales trend, while bars highlight profit
fluctuations across months.
2. Combo Chart Example:
o Purpose: Compare sales and profit across different regions, highlighting
both individual sales and profitability trends.
o Visual Type: Bar for Sales and line for Profit per region.
o Result: The bar chart compares sales by region, and the line shows profit
trends, making it easy to compare the two measures.
3. Synchronized Axes Example:
o Purpose: Compare annual sales and profit, ensuring that the axes are
synchronized to reflect the actual proportions of each.
o Visual Type: Dual-axis line chart for Sales and Profit.
o Result: A clear view of how both sales and profit trends compare over
time, with synchronized axes for easy interpretation.
Using Marks and Cards:
In Tableau, the Marks Card is a powerful tool for customizing visualizations. It allows
you to control the way data is represented in terms of color, size, shape, detail, and
label. These controls give you the flexibility to tailor your visuals, making them not only
aesthetically pleasing but also more informative and easier to interpret.
Below is a walkthrough of how to use the Marks Card effectively for data clarity and
enhancing visual communication.
1. Understanding the Marks Card
The Marks Card appears on the right-hand side of the workspace and allows you to
customize each mark (data point) in your visualization. Depending on the type of
ANJIRAJU
visualization (e.g., bar chart, scatter plot, line chart), the options within the Marks Card
may vary.
Key elements within the Marks Card:
• Type: Choose the visualization type (e.g., Bar, Line, Circle, Text).
• Color: Control the color of the marks.
• Size: Adjust the size of the marks.
• Shape: Modify the shape of the marks (e.g., circle, square, custom image).
• Detail: Add extra dimensions or fields to provide more context without affecting
the visual size.
• Label: Show textual data within the marks (e.g., numerical values, categories).
2. Customizing the Visualization Using Marks Cards
Color:
• Purpose: Color is often used to distinguish between different categories or
highlight trends and patterns.
• How to Use:
1. Drag a dimension (e.g., Region) or measure (e.g., Profit) to the Color
button on the Marks Card.
2. Tableau will automatically assign a color palette to the different
categories or values.
3. You can click on the Color legend to adjust the color palette to something
more meaningful or to highlight specific values.
4. Example: If you drag Profit to Color, higher profits might be displayed in
green and lower profits in red.
• Best Practices:
o Use color to highlight meaningful differences, such as low vs. high values
or specific categories.
o Avoid using too many colors—limit it to 5-7 distinct colors for better
readability.
o Use color gradients for continuous measures and distinct colors for
discrete dimensions.
Size:
• Purpose: Adjust the size of the marks to reflect a measure (e.g., quantity,
volume, size) and to visually emphasize certain data points.
ANJIRAJU
• How to Use:
1. Drag a measure (e.g., Sales, Quantity) to the Size button on the Marks
Card.
2. Tableau will adjust the size of the marks based on the values of the
measure.
3. You can adjust the Size slider to make the marks larger or smaller.
4. Example: You could size the marks by Quantity Sold to visually show
which products sold the most.
• Best Practices:
o Use size to emphasize outliers or trends that are particularly significant.
o Be cautious with using size for too many data points, as this can cause
clutter.
o Ensure that the size variation is clear and not too subtle for users to
interpret easily.
Shape:
• Purpose: The shape of the marks can help differentiate categories or create
more engaging visual designs.
• How to Use:
1. Drag a dimension (e.g., Category, Region) to the Shape button on the
Marks Card.
2. Tableau will automatically assign different shapes for each category.
3. You can click on the Shape legend to customize the shapes (e.g., circle,
square, custom image).
4. Example: You could use different shapes for each Product Category, such
as circles for Furniture and triangles for Office Supplies.
• Best Practices:
o Use shapes sparingly and only when they add meaningful differentiation
(e.g., for categories with few distinct values).
o Avoid using too many shapes, as it can create confusion and clutter.
Detail:
• Purpose: The Detail shelf allows you to add additional context or granularity to
the visualization without changing the visual representation (i.e., it won’t affect
size, color, or shape directly).
ANJIRAJU
• How to Use:
1. Drag a dimension (e.g., State, Customer ID) or measure (e.g., Profit
Margin) to the Detail button on the Marks Card.
2. Tableau will add the additional data to the tooltip, which will appear when
users hover over a mark.
3. Example: If you add Product to Detail, hovering over a data point will
show which specific product the data point represents.
• Best Practices:
o Use Detail for adding context or providing additional information in
tooltips.
o Avoid overloading with too many dimensions, as it can make the tooltip
cluttered and harder to read.
Label:
• Purpose: Labels display text on the marks, allowing you to show the exact value
or category associated with each mark.
• How to Use:
1. Drag a measure (e.g., Sales, Profit) or dimension (e.g., Product) to the
Label button on the Marks Card.
2. Tableau will display the corresponding value directly on the mark.
3. You can adjust the font, size, and alignment of the labels for better clarity.
4. Example: Adding Sales to Label will show the exact sales amount on
each bar in a bar chart.
• Best Practices:
o Labels should be concise and not clutter the visual.
o Use labels primarily when you want to show exact values for comparison
(e.g., showing exact sales figures next to bars).
o Avoid label overload by only adding essential data to labels.
3. Best Practices for Customizing Visuals for Data Clarity
General Guidelines:
1. Simplicity is Key: Avoid overcomplicating the visual by using too many
customizations. Stick to the essential elements that communicate the data
clearly.
ANJIRAJU
2. Consistency in Color: Use a consistent color scheme to represent similar data
types. For example, use shades of blue for all measures related to sales or
profits.
3. Interactive Tooltips: Make sure that tooltips (generated by the Detail shelf)
provide useful information that adds value to the visualization without
overcrowding the chart.
4. Readable Labels: Keep labels clear and legible. Avoid displaying too many
decimal places and use simple units of measurement (e.g., thousands,
millions).
5. Legend and Axis Labels: Ensure that legends and axis labels are clear and
appropriately titled, so users understand what the marks represent.
Examples of Data Clarity:
• Color-Coded Profitability: In a bar chart of Sales by Region, use green for
positive Profit and red for negative Profit. This gives a clear indication of
profitability across regions.
• Size and Shape for Highlighting Trends: In a scatter plot comparing Sales vs.
Profit, use size to emphasize high Sales values and shape to differentiate
product categories.
• Labeling for Precise Values: In a line chart of Sales over time, label the peaks
and troughs with the exact Sales figures to allow users to quickly identify key
performance points.
4. Practical Example: Customizing a Sales Dashboard
Imagine you have a dashboard that shows Sales by Region and Product Category for the
year. Here's how you might use the Marks Card:
• Color: Use color to differentiate between regions (e.g., Blue for North, Green for
South).
• Size: Size the bars to reflect Sales, so larger sales values are represented with
larger bars.
• Shape: Use shapes to distinguish between different product categories (e.g.,
circle for Furniture, square for Technology).
• Label: Display Sales value on each bar for clarity.
• Detail: Add Product to Detail for extra insight in the tooltip when users hover over
any bar.
ANJIRAJU
6. Advanced Data Visualizations:
ANJIRAJU
o For datasets where numerical accuracy needs to be paired with visual
cues.
• Why Use:
o Highlight tables maintain the clarity of tabular data while adding color to
emphasize variations.
3. How to Create a Heatmap or Highlight Table
Steps to Create a Heatmap:
1. Drag Dimensions to Rows and Columns:
o Place a categorical dimension (e.g., Region) on the Columns shelf.
o Place another categorical dimension (e.g., Product Category) on the
Rows shelf.
2. Add a Measure to Color:
o Drag a measure (e.g., Sales) to the Color section on the Marks Card.
3. Set Mark Type to Square:
o On the Marks Card, set the Mark Type to Square for a traditional heatmap
look.
4. Adjust the Color Intensity:
o Click Color on the Marks Card to edit the color palette.
o Use a diverging color scheme for datasets with both positive and
negative values (e.g., red for losses, green for profits).
o Use a sequential color scheme for datasets with only positive or
increasing values.
Steps to Create a Highlight Table:
1. Follow Steps 1 and 2 Above:
o Drag dimensions to Rows and Columns and a measure to Color.
2. Drag the Measure to Text:
o Drag the same measure (e.g., Sales) to the Label or Text section on the
Marks Card.
o This will display the numeric value within each cell.
3. Set Mark Type to Square or Text:
o On the Marks Card, use Square for the color emphasis, or Text for a
simpler format.
ANJIRAJU
4. Advanced Use Cases
Time-Based Heatmaps:
• Use heatmaps to track performance or trends over time:
o Place Date or Month on the Columns shelf.
o Place a categorical dimension (e.g., Product Category) on the Rows shelf.
o Drag Sales or Profit to Color.
o Result: A heatmap showing sales performance for each product category
over time, where darker colors indicate higher sales.
Categorical Data with Highlight Tables:
• Use highlight tables for category-wise comparisons:
o Place Region on the Columns shelf and Product Category on the Rows
shelf.
o Drag Profit Margin to Color and Label.
o Result: A highlight table showing profitability for each region and product
category, with color intensity emphasizing performance.
Segmented Analysis:
• Combine heatmaps with filters to analyze specific segments:
o Add Region or Category as a Filter.
o Adjust filters dynamically to focus on subsets of data, such as low-
performing regions or high-profit categories.
5. Best Practices for Using Heatmaps and Highlight Tables
For Heatmaps:
1. Limit the Dimensions:
o Too many rows and columns can make the heatmap cluttered and hard to
interpret.
o Focus on a subset of key dimensions.
2. Use Meaningful Color Palettes:
o Choose palettes that are intuitive (e.g., green for high values, red for low
values).
o Avoid using excessive color contrast, which can strain the user’s eyes.
3. Provide Context:
ANJIRAJU
o Include legends to explain the meaning of the color intensity.
o Use tooltips for additional information about each cell.
For Highlight Tables:
1. Simplify Labels:
o Ensure numeric values are formatted appropriately (e.g., rounded to two
decimal places or in thousands/millions).
2. Avoid Overlapping Data:
o Use concise color ranges to avoid overshadowing numeric labels.
3. Use Sparingly:
o Highlight tables are best for moderate-sized datasets; for larger datasets,
consider a heatmap.
6. Example Use Cases
Heatmap Example:
• Scenario: Analyze the performance of sales teams across regions.
• Setup:
o Dimensions: Region (Columns) and Sales Team (Rows).
o Measure: Sales on Color.
• Outcome: Identify the top-performing regions and sales teams at a glance.
Highlight Table Example:
• Scenario: Compare profit margins for products in various categories.
• Setup:
o Dimensions: Product Category (Rows) and Region (Columns).
o Measure: Profit Margin on Color and Text.
• Outcome: A precise, easy-to-read table highlighting the most profitable
products.
Geospatial Maps
Tableau is a powerful tool for creating geospatial maps, allowing you to visualize data
with geographical context. This guide covers how to create different types of maps—
polygon maps, density maps, and maps with layered data using latitude/longitude
points—for precise location-based analysis.
ANJIRAJU
1. Types of Geospatial Maps in Tableau
Basic Map:
A simple map that visualizes data geographically based on predefined geographical
fields (e.g., Country, State, City).
Polygon Map:
A map where specific regions are drawn using polygons, allowing you to represent
custom geographies like sales territories or neighborhood boundaries.
Density Map:
A heatmap-like map that shows the concentration of data points, useful for identifying
hotspots or clustering patterns.
Layered Map with Latitude/Longitude Points:
A map with multiple layers, combining geographical data like regions or territories with
precise points based on custom latitude/longitude data.
2. Creating Different Map Types
A. Basic Geographical Map
1. Prepare the Data:
o Ensure your dataset includes recognized geographical fields (e.g.,
Country, State, City, Postal Code).
2. Steps to Create:
o Drag a geographical field (e.g., State) to the Rows or Columns shelf.
o Tableau will automatically generate a map.
o Add a measure (e.g., Sales, Profit) to the Color or Size on the Marks Card
to visualize data intensity.
3. Customize:
o Adjust color schemes and tooltips for better interpretation.
o Add filters to focus on specific regions.
B. Polygon Maps
Polygon maps use custom shapes (polygons) to define specific areas on a map.
1. Prepare the Data:
o The dataset must include the following fields:
▪ Latitude
ANJIRAJU
▪ Longitude
▪ Polygon ID: Unique identifier for each polygon.
▪ Order: Specifies the order in which points are connected to form
the shape.
2. Steps to Create:
o Drag Latitude to the Rows shelf and Longitude to the Columns shelf.
o Change the Mark Type on the Marks Card to Polygon.
o Drag the Polygon ID field to the Detail section.
o Drag the Order field to the Path section to connect the points in the
correct sequence.
3. Customize:
o Add a measure (e.g., Profit) to Color to differentiate areas by
performance.
o Adjust the transparency and border settings for a polished look.
C. Density Maps
Density maps show the intensity of data points in a specific area, useful for highlighting
clusters or hotspots.
1. Prepare the Data:
o Ensure your dataset includes fields for latitude/longitude or other
geographical dimensions.
2. Steps to Create:
o Drag Latitude to the Rows shelf and Longitude to the Columns shelf.
o Change the Mark Type on the Marks Card to Density.
o Add a measure (e.g., Number of Records) to Color to represent the
intensity.
3. Customize:
o Use the Color option to adjust the gradient for better clarity (e.g., green-
to-red for low-to-high intensity).
o Adjust the density slider to control the spread of the intensity.
D. Layered Map with Latitude/Longitude Points
This map allows you to overlay multiple data layers, such as regional boundaries and
specific locations.
ANJIRAJU
1. Prepare the Data:
o Include separate datasets for:
▪ Regions: Defined by geographical fields or polygons.
▪ Points: With latitude/longitude data for precise locations.
2. Steps to Create:
o Layer 1: Create a basic map:
▪ Drag a geographical field (e.g., Region) to the Rows or Columns
shelf.
o Layer 2: Add latitude/longitude points:
▪ Drag the Latitude and Longitude fields from the second dataset to
the Columns and Rows shelves.
▪ Tableau will plot the points as a new layer.
o Use the Dual-Axis feature:
▪ Right-click on one of the axes and select Dual Axis to layer the
data.
3. Customize:
o Use different Mark Types for each layer (e.g., polygons for regions and
circles for points).
o Adjust transparency and colors to distinguish layers.
3. Advanced Features for Geospatial Maps
Filters and Tooltips:
• Use filters to focus on specific locations or categories.
• Customize tooltips to display additional details (e.g., Sales, Profit, Category).
Geocoding Custom Locations:
• If Tableau doesn't recognize a location, you can manually assign latitude and
longitude values.
• Go to Map > Edit Locations to fix unrecognized locations.
Map Layers:
• Tableau provides base layers such as streets, boundaries, and demographic
overlays.
• Go to Map > Map Layers to enable or disable these features.
ANJIRAJU
Spatial Files:
• Tableau supports importing spatial files (e.g., SHP, KML, GeoJSON) for advanced
mapping needs.
• Go to Connect and choose Spatial File to import your custom geographic data.
4. Best Practices for Geospatial Maps
1. Simplify Data Layers:
o Avoid overcrowding the map with too many layers or data points. Focus
on the most relevant insights.
2. Use Meaningful Color Schemes:
o Use intuitive color gradients (e.g., blue for low values, red for high values).
o Avoid overly complex color palettes that may confuse users.
3. Add Contextual Information:
o Include legends, titles, and tooltips to help users interpret the map.
4. Optimize for Performance:
o Large datasets with detailed polygons or numerous data points can slow
down rendering. Use filters to limit the scope of the data.
ANJIRAJU
2. When to Use Tree Maps and Packed Bubbles
Tree Maps:
• Best for hierarchical data where categories can be grouped into subcategories.
• Ideal for showing the relative proportions of categories and subcategories.
• Examples:
o Sales by product category and subcategory.
o Revenue contribution by region and state.
Packed Bubbles:
• Best for non-hierarchical data with a focus on proportional relationships.
• Suitable for highlighting the relative size of categories without requiring a
hierarchy.
• Examples:
o Market share by brand.
o Number of customers by region.
3. How to Create Tree Maps and Packed Bubbles in Tableau
A. Tree Maps
1. Prepare Your Data:
o Ensure the dataset includes at least one dimension (e.g., Category) and
one measure (e.g., Sales).
2. Steps to Create:
o Drag a dimension (e.g., Category) to the Rows or Columns shelf.
o Drag a measure (e.g., Sales) to the Size on the Marks Card.
o Change the Mark Type to Square or Automatic, and Tableau will generate
a tree map.
o Drag another dimension (e.g., Sub-Category) to the Detail section to
create hierarchy.
3. Customize:
o Add a measure (e.g., Profit) to the Color section to show variations within
the tree map.
o Adjust labels using the Label section on the Marks Card to display
category names or values.
ANJIRAJU
B. Packed Bubbles
1. Prepare Your Data:
o Ensure the dataset includes a dimension (e.g., Region) and a measure
(e.g., Sales).
2. Steps to Create:
o Drag the dimension (e.g., Region) to the Rows or Columns shelf.
o Drag the measure (e.g., Sales) to the Size section on the Marks Card.
o Change the Mark Type to Circle.
o Tableau will automatically create packed bubbles.
3. Customize:
o Add colors to the Color section to differentiate categories.
o Use the Label section to display category names or measure values on
the bubbles.
4. Best Practices for Tree Maps and Packed Bubbles
Tree Maps:
1. Limit Hierarchical Levels:
o Avoid excessive nesting of categories, as it can make the tree map
difficult to interpret.
o Stick to 1-2 levels of hierarchy for clarity.
2. Use Color Meaningfully:
o Use color gradients to represent another measure (e.g., profit margins).
o Avoid using too many colors, as they can overwhelm the user.
3. Prioritize Space Allocation:
o Larger rectangles should represent the most critical categories to draw
attention.
Packed Bubbles:
1. Minimize Overlap:
o Ensure bubbles are not overly cluttered to maintain readability.
o Use filters or limit categories if the dataset is too large.
2. Add Informative Labels:
ANJIRAJU
o Display essential information (e.g., category names or values) on the
bubbles to provide context.
3. Avoid Small Bubbles:
o Extremely small bubbles can detract from the visualization’s
effectiveness. Consider excluding minor categories or grouping them.
Example Scenarios
Tree Map Example: Sales by Product
• Scenario: Analyze sales across product categories and subcategories.
• Steps:
o Drag Category to Rows and Sales to Size.
o Add Sub-Category to Detail to create hierarchy.
o Add Profit to Color to show profitability variations.
• Outcome: A clear hierarchical view of which products drive the most sales and
profit.
Packed Bubble Example: Market Share by Brand
• Scenario: Visualize market share of brands in a competitive analysis.
• Steps:
o Drag Brand to Rows and Market Share to Size.
o Add Region to Color to differentiate by region.
• Outcome: A proportional representation of market share by brand, with regional
distinctions.
6. Dashboard Development:
Interactive dashboards are at the core of creating an engaging and meaningful user
experience in Tableau.
Here’s a comprehensive guide covering techniques for combining sheets, adding
interactivity, and optimizing layouts:
1. Combining Sheets in a Dashboard
• Drag-and-Drop Sheets: Drag sheets (views) from the "Sheets" section onto the
dashboard workspace.
• Tiled vs. Floating Layouts:
ANJIRAJU
o Tiled: Automatically arranges components without overlap.
o Floating: Allows overlapping and free placement of objects.
• Container Usage:
o Horizontal Containers: Align sheets side by side.
o Vertical Containers: Stack sheets vertically.
o Use containers for dynamic resizing and organizing groups of
components.
2. Adding Interactive Filters
• Quick Filters:
o Add a filter to your sheet, then make it visible on the dashboard by right-
clicking and selecting "Show Filter."
o Use filter customization options (single value dropdown, multi-select list,
sliders) for tailored user control.
• Global Filters:
o Apply a filter across multiple sheets by ensuring the filter is set to “Apply
to all using this data source.”
• Filter Actions:
o Go to Dashboard > Actions > Add Action > Filter.
o Configure filters to link sheets. For example, clicking a region in a map
filters a bar chart below to display relevant data.
3. Parameter Controls
• Create Parameters:
o Go to the Data pane, select Create Parameter.
o Define the parameter (data type, list of values, or range).
• Connect Parameters to Calculated Fields:
o Use parameters in calculated fields to control what data is displayed.
o Example: Use a parameter to switch between sales and profit metrics.
• Show Parameter Control:
o Right-click the parameter and select "Show Parameter."
o Customize it for dropdowns, sliders, or manual input.
ANJIRAJU
4. Layout and User Experience Considerations
• Consistent Design:
o Maintain a cohesive look with consistent fonts, colors, and spacing.
• Responsive Layouts:
o Enable “Use as Filter” to allow seamless interactions.
o Test layouts on various screen sizes with Device Preview.
• Minimize Clutter:
o Avoid overwhelming users with too much information. Highlight key data
points.
• Dynamic Zone Visibility:
o Use Show/Hide Containers to let users toggle the visibility of additional
details or views.
• Legends and Tooltips:
o Place legends effectively and ensure tooltips provide actionable insights.
• Fixed vs. Dynamic Sizes:
o Use fixed sizes for dashboards that require precision, and dynamic sizes
for adaptability.
5. Adding Interactive Actions
• Filter Actions:
o Allow users to click elements (e.g., charts, maps) to filter other views.
• URL Actions:
o Enable users to navigate to external web pages based on their selections.
• Highlight Actions:
o Guide users by emphasizing data points when interacting with certain
areas.
• Go-to-Sheet Navigation:
o Use buttons or images to navigate between dashboards or sheets within a
workbook.
ANJIRAJU
6. Testing and Optimization
• Preview Mode:
o Test interactivity by entering Presentation Mode and mimicking user
behaviors.
• Performance Optimization:
o Reduce the number of data sources and calculated fields to improve
loading times.
o Use data extracts for better performance.
• Iterative Refinement:
o Gather feedback from end-users and adjust the design for clarity and
usability.
ANJIRAJU
▪ Choose what happens when a selection is cleared (e.g., show all
values, keep filtered values, or exclude all values).
3. Test the Interaction:
o Hover or click on a source data point to observe the filtering effect on the
target sheets.
Example Use Case:
• Clicking a region on a map filters a bar chart below to display sales for that
specific region.
2. Highlight Actions
Highlight actions allow users to emphasize specific data points across sheets based on
their interactions.
How to Create a Highlight Action
1. Access Actions Menu:
o Go to Dashboard > Actions > Add Action > Highlight.
2. Configure the Highlight:
o Source Sheets: Select the sheet(s) where the interaction originates.
o Target Sheets: Select the sheet(s) where data points are highlighted.
o Run Action On:
▪ Hover: Highlights data when the user hovers over a data point.
▪ Select: Highlights data when the user clicks a data point.
3. Test the Interaction:
o Hover or click on a data point to see related data highlighted across other
sheets.
Example Use Case:
• Hovering over a product category in a bar chart highlights related data in a pie
chart or line graph.
3. URL Actions
URL actions let users open a web page or application by interacting with a data point in
the dashboard.
How to Create a URL Action
1. Access Actions Menu:
o Go to Dashboard > Actions > Add Action > URL.
ANJIRAJU
2. Configure the URL Action:
o Source Sheets: Select the sheet(s) where the interaction originates.
o URL:
▪ Insert the URL of the target web page.
▪ Use dynamic fields to customize the URL based on user selections
(e.g., https://example.com?region=<Region>).
o Run Action On:
▪ Hover, Select, or Menu.
3. Test the Interaction:
o Click on a data point or menu item to navigate to the specified URL.
Example Use Case:
• Clicking on a company name in a table redirects to its official website or detailed
profile page.
ANJIRAJU
▪ Desktop: Full-screen dashboards for large monitors.
▪ Tablet: Medium-sized screens, typically landscape-oriented.
▪ Phone: Small screens with a vertical (portrait) layout.
2. Set Default Layout:
o Define which layout Tableau should display if no specific match is found.
This ensures fallback compatibility for unexpected screen sizes.
3. Customize Each Layout
Each layout operates independently, allowing for tailored adjustments:
• Add/Remove Elements:
o Drag or remove sheets, filters, and other components to fit the device's
screen size and orientation.
• Adjust Sizing and Placement:
o Resize charts, text boxes, and legends for better readability on smaller
screens.
• Use Containers for Flexibility:
o Horizontal or vertical containers ensure consistent spacing and
alignment.
• Hide or Show Specific Components:
o Use the Hide Layout button to remove unnecessary elements from a
device-specific view.
4. Optimize for Each Device
1. Desktop:
o Use a fixed size or allow resizing for larger screens.
o Include detailed visualizations with minimal constraints.
2. Tablet:
o Focus on simplicity and medium-level detail.
o Adjust text and chart sizes to prevent clutter.
3. Phone:
o Prioritize critical metrics or KPIs.
o Use vertical stacking and avoid side-by-side charts.
o Test navigation using actions or filters to ensure usability.
ANJIRAJU
5. Preview and Test
• Preview Layouts:
o In the Device Designer, select a device type to preview how the dashboard
appears on different screen sizes.
• Simulate Interaction:
o Test interactive features (filters, actions, tooltips) to ensure usability
across all layouts.
• Fine-Tune Layouts:
o Iterate based on testing results to improve readability and navigation.
Benefits of Device-Specific Layouts
• Improved User Experience: Tailored designs provide optimal usability.
• Increased Accessibility: Ensures dashboards are functional on all devices.
• Professional Presentation: Makes your dashboards look polished and user
centric.
ANJIRAJU
o Name your calculated field descriptively (e.g., "Profit Margin" or "Sales
Performance Indicator").
2. Write the Formula:
o Use Tableau's calculation syntax and functions to define your custom
logic.
o Common functions:
▪ Arithmetic: +, -, *, /
▪ Logical: IF, CASE, AND, OR
▪ Aggregations: SUM(), AVG(), MIN(), MAX()
▪ String: CONTAINS(), LEFT(), RIGHT()
▪ Date: DATEPART(), DATEDIFF()
3. Validate:
o Tableau indicates whether the calculation is valid or has errors.
o Fix any syntax issues before saving.
4. Apply the Field:
o Drag the new calculated field into rows, columns, or marks (e.g., color,
size, label) to visualize it.
ANJIRAJU
ANJIRAJU
5. Best Practices for Calculated Fields
1. Keep Formulas Simple:
o Break down complex calculations into smaller fields for better readability
and debugging.
2. Test Calculations:
o Use a table view or tooltip to validate outputs before finalizing.
3. Leverage Parameter Integration:
o Combine calculated fields with parameters for dynamic user input.
4. Name Fields Clearly:
o Use descriptive names to make it easy to identify the field's purpose.
5. Optimize Performance:
o Use aggregated fields and minimize row-level calculations for large
datasets.
ANJIRAJU
6. Visualizing with Calculated Fields
• Color Encoding: Use calculated fields to dynamically color charts based on
performance thresholds.
• Size Scaling: Apply calculated fields to size marks for proportional visual
representation.
• Labels: Display calculated metrics directly on charts for user convenience.
Table calculations are a powerful way to perform advanced analytics on aggregated data in
Tableau. They allow for calculations like running totals, differences, moving averages, and
more, directly within a visualization without modifying the underlying data source.
1. Running Total:
2. Difference:
3. Percent Difference:
4. Moving Average:
5. Percent of Total:
ANJIRAJU
o Computes the percentage contribution of each value to the total.
6. Rank:
• You can write custom calculations using Table Calculation functions like
WINDOW_SUM, LOOKUP, and RANK.
o Drag the desired measure (e.g., Sales) into the Rows, Columns, or Marks shelf.
o Scope: Determines which part of the table the calculation operates on (e.g.,
table, pane, cell).
o For advanced use cases, edit the calculation formula directly in the calculation
editor.
• Built-in Method:
• Custom Syntax:
RUNNING_SUM(SUM([Sales]))
• Use Case:
ANJIRAJU
o Cumulative sales over months.
B. Difference
• Built-in Method:
• Custom Syntax:
• Use Case:
C. Moving Average
• Built-in Method:
• Custom Syntax:
WINDOW_AVG(SUM([Sales]), -2, 0)
• Use Case:
D. Percent of Total
• Built-in Method:
• Custom Syntax:
SUM([Sales]) / TOTAL(SUM([Sales]))
• Use Case:
E. Rank
• Built-in Method:
• Custom Syntax:
RANK(SUM([Sales]))
• Use Case:
ANJIRAJU
5. Advanced Custom Table Calculations
A. Calculating Year-over-Year Growth
(SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / LOOKUP(SUM([Sales]), -1)
7. Best Practices
1. Start Simple:
o Tableau’s Compute Using and Edit Table Calculation tools help visualize how
calculations are applied.
Level of Detail (LOD) Expressions in Tableau allow you to control the granularity of your
calculations, independent of the dimensions in your visualization. This makes them
ANJIRAJU
incredibly useful for creating precise calculations, such as cohort analysis, relative
comparisons, and nested aggregations.
1. FIXED:
2. INCLUDE:
3. EXCLUDE:
Use Case: Show regional totals even when filtering by other dimensions, such as categories or
products.
Example: Calculate average sales per customer within the existing view.
ANJIRAJU
Use Case: Display average sales per customer within a region or category without explicitly
adding the customer dimension to the view.
Example: Calculate overall average sales while excluding the product category from the
calculation.
ANJIRAJU
ANJIRAJU
8. Visualizing LOD Expressions
o The visualization should convey the message clearly and without ambiguity.
ANJIRAJU
o Avoid clutter or unnecessary visual elements.
2. Data-Purpose Fit:
o Match the chart type to the nature of the data and the analysis goals.
3. Avoid Distortion:
4. User Experience:
A. Bar Charts
• Purpose:
• Best Practices:
• Example:
B. Line Charts
• Purpose:
• Best Practices:
• Example:
ANJIRAJU
C. Scatter Plots
• Purpose:
• Best Practices:
• Example:
D. Pie Charts
• Purpose:
• Best Practices:
• Example:
E. Area Charts
• Purpose:
• Best Practices:
• Example:
F. Heatmaps
• Purpose:
ANJIRAJU
o Highlight intensity or density within a grid.
• Best Practices:
• Example:
G. Histogram
• Purpose:
• Best Practices:
• Example:
H. Bubble Charts
• Purpose:
• Best Practices:
• Example:
I. Tree Maps
• Purpose:
• Best Practices:
ANJIRAJU
o Avoid overcrowding with too many small rectangles.
• Example:
J. Gantt Charts
• Purpose:
• Best Practices:
• Example:
o Avoid using too many colors; use shades for related categories.
2. Simplify Labels:
4. Use Interactivity:
o Ensure it answers the intended question and is intuitive for your audience.
1. Overcomplication:
o Combining too many dimensions or measures in one chart can confuse viewers.
ANJIRAJU
o Use multiple smaller charts instead.
2. Improper Scales:
o Pie charts can be difficult to interpret for more than a few categories. Switch to
bar charts if necessary.
o Place the most critical insights or key performance indicators (KPIs) at the top or
center.
o Arrange visuals to guide the user naturally through the analysis (e.g., left-to-right,
top-to-bottom).
5. Responsive Design:
2. Color Usage
o Use Tableau’s built-in palettes or custom palettes that align with your brand or
project theme.
3. Focus on Contrast:
o Ensure sufficient contrast between the background, text, and data points for
accessibility.
o Use color palettes that are accessible to colorblind users, such as red-blue or
orange-green combinations.
3. Typography
o Use simple, sans-serif fonts like Arial, Helvetica, or Tableau's default font for
clarity.
2. Font Sizes:
ANJIRAJU
o Ensure titles are larger than subtitles or labels for visual hierarchy.
o Use 12-14 pt font for labels and 18-24 pt font for titles.
o Use one or two font styles throughout the dashboard to maintain consistency.
o Ensure KPIs and critical insights stand out with bold text or distinct colors.
o Use tools like Tableau’s Color Blind-Friendly Palette to check for accessibility.
o Ensure charts and labels are legible in both light and dark environments.
5. Enhancing Engagement
1. Add Interactivity:
o Use filters, dropdowns, and parameter controls to let users explore data.
2. Provide Context:
o Share your dashboard with a sample audience to gather feedback and improve
usability.
o Focus on answering specific questions rather than including all available data.
ANJIRAJU
2. Inconsistent Design:
3. Misleading Visualizations:
o Ensure dashboards are optimized for all device types using Tableau’s responsive
layouts
Story Points in Tableau allow you to craft a narrative-driven approach to data visualization by
organizing insights into a sequence. This feature helps guide your audience through a logical
progression of trends, comparisons, and conclusions.
Story Points are a collection of sheets, dashboards, or visualizations organized into a linear
sequence. Each point in the story represents a step in the narrative, allowing users to focus on
specific insights.
ANJIRAJU
• Outline the Flow:
o Structure the narrative with a beginning (context), middle (analysis), and end
(conclusions).
o Select the most impactful charts, dashboards, or tables for each part of the
story.
1. In Tableau, go to the New Story button in the toolbar or navigate to Worksheet > New
Story.
• Ensure a logical flow from one point to the next to build understanding.
• Use Text Boxes to provide explanations or annotations for each story point.
1. Interactive Navigation:
o Users can click through the navigator to move between story points.
2. Customizable Layouts:
o Adjust the size, arrangement, and design of each story point for better clarity.
ANJIRAJU
3. Highlight Actions:
o Add interactivity by allowing users to explore data points further (e.g., drill-
downs).
• Caption: "Sales have grown consistently over the past two years."
• Caption: "The West region leads in sales, while the South shows potential for growth."
• Caption: "Electronics drive the majority of sales, with accessories showing a recent
uptick."
• Caption: "Focus on expanding in the South region and increasing accessory inventory."
o Avoid overwhelming the audience with too much detail in each point.
o Review the sequence to ensure the story builds logically and effectively conveys
the intended message.
ANJIRAJU
6. Benefits of Story Points
• Narrative Clarity:
• Engagement:
• Guided Insights:
1. Mark Annotation:
2. Point Annotation:
ANJIRAJU
3. Area Annotation:
o Right-click a data point, axis, or area where you want to add an annotation.
1. Be Concise:
o Maintain uniform font style, size, and color for all annotations.
o Use the editor to add text, insert fields, and format the content.
o To insert a field, click the Insert button and select the desired field (e.g., Sales,
Profit).
o Example
ANJIRAJU
Region: <Region>
Sales: $<SUM(Sales)>
• Example: A tooltip that shows profit percentage when a user hovers over a specific
product.
1. What It Does:
2. How to Enable:
o Drag the supporting sheet to the Viz in Tooltip section in the Tooltip editor.
ANJIRAJU
o Preview how annotations and tooltips appear on different devices and screen
sizes.
2. Generic Content:
3. Unclear Formatting:
Unlike static parameters, which are fixed and require manual updates, dynamic parameters
adapt to the changing data, making them more suitable for real-time, data-driven analysis.
ANJIRAJU
2. Setting Up Dynamic Parameters
Step 1: Create a Parameter
o Define whether the user will select from a list, range, or a continuous input.
o To make the parameter dynamic, you’ll often need to create a calculated field
that references the parameter and updates based on changes in the data.
o Example: If you're creating a parameter for year selection, you could base it on a
field like YEAR([Order Date]).
• Drag the calculated field into filters or into rows/columns to display the relevant data for
the selected parameter.
o Let users dynamically adjust the date range they want to analyze.
o Example: "Select start date" and "Select end date" parameters for a custom date
range.
o Enable users to select the metrics they want to compare (e.g., sales, profit, and
quantity).
ANJIRAJU
o Example: A parameter that switches between viewing Sales or Profit on the same
graph.
o Dynamically allow users to choose the top or bottom N records, like top-
performing products or regions.
o Example: A parameter that enables users to switch between the top 5, top 10, or
top 20 products based on sales.
o Set it to accept a date range (e.g., start date and end date).
IF [Order Date] >= [Start Date Parameter] AND [Order Date] <= [End Date Parameter] THEN
[Sales] END
• Use this calculated field in the Filters shelf to dynamically filter data based on user
input.
o Example
END
ANJIRAJU
• Drag the calculated field onto your visualization to allow the user to dynamically change
between metrics like Sales, Profit, or Quantity.
o Limit the number of parameters to avoid overwhelming users. Stick to the most
important and impactful dimensions or measures.
o Ensure that the dynamic parameter reflects the current data. For instance, if you
are using a dynamic date parameter, ensure that it automatically updates based
on the available data range.
4. Optimize Performance:
o Use dynamic parameters with specific and limited data sets (e.g., Top 10
products, recent 6 months of data) to avoid cluttering the user interface and
overwhelming the dashboard.
ANJIRAJU
7. Benefits of Dynamic Parameters
1. Personalized User Experience:
2. Enhanced Interactivity:
o Users can interactively filter and control data on their own terms, providing more
depth and flexibility.
3. Improved Decision-Making:
o By allowing users to control the flow of the dashboard, dynamic parameters help
facilitate data exploration, leading to better insights and informed decisions.
o Dynamic parameters ensure that the data being analyzed is always up-to-date,
eliminating the need for manual updates.
Extracts improve performance by storing a snapshot of the data locally. However, large extracts
can affect performance. To reduce extract size:
o Filter out unnecessary records in the extract process. For example, if you're
working with historical data, extract only the most recent months or years.
o Instead of extracting all raw data, aggregate it to a higher level (e.g., sum sales by
region or department).
o Aggregating the data before extracting it will significantly reduce the extract size.
ANJIRAJU
3. Remove Unused Fields:
o During extract creation, remove fields that aren’t necessary for your analysis.
o If the data doesn't change frequently, extract only once a day or less often.
o For real-time data, using a live connection might be more efficient than relying
on large extracts.
• Apply filters at the data source level to restrict the data being loaded, which can reduce
the amount of data Tableau needs to handle.
o Example: If you have a global dataset, filter by region to load only the data
needed for the user.
• Complex calculated fields (especially those that use nested functions) can slow down
workbook performance.
o Avoid using calculations like IF or CASE within calculated fields that are used in
views with large datasets.
• Every time you filter, change a parameter, or update a dashboard, Tableau sends a query
to the data source.
o Use Extracts instead of live connections where possible, especially for large
datasets.
o Avoid using too many complex or outer joins in the data source. Instead, use
inner joins or data blending if necessary.
ANJIRAJU
o Ensure that joins are based on indexed fields in the database for faster query
execution.
o Prefer joining tables with similar granularity (e.g., sales table with a sales detail
table).
o Relationships allow Tableau to query only the necessary tables based on the
fields used in the worksheet.
• Pre-aggregate Calculations:
o Avoid using calculated fields at the view level for large datasets. Instead, pre-
aggregate calculations in the data source (e.g., use SQL or database-level
calculations).
o Example: Calculate totals at the database level rather than using Tableau’s
SUM() or AVG() for every row.
o When possible, create calculated fields directly in the data source (in SQL, for
example) to reduce Tableau's processing load.
o Simplify the logic where possible and try breaking down complex calculations
into simpler ones.
• While Table Calculations (e.g., RUNNING_SUM, WINDOW_AVG, etc.) are powerful, they
can be slow when applied to large datasets because they are computed at the view level
rather than in the data source.
ANJIRAJU
o Where possible, calculate summary metrics in the data source and use Tableau
for visualization, rather than relying on table calculations for complex
aggregations.
• Cross-database joins can be slower because they require Tableau to perform multiple
queries on different databases and combine the results.
o Whenever possible, join data in the same database before connecting Tableau to
it.
o Use Data Blending instead of cross-database joins when dealing with data from
multiple sources.
• Extracts are faster than live connections, especially when dealing with large datasets.
Extracts are pre-aggregated snapshots of your data.
o Use live connections only when real-time data is required or if the dataset is
small enough to handle with live queries.
• When working with Tableau Server or Tableau Online, ensure that the server hardware
and network infrastructure can handle the load of the queries.
o Reduce the number of sheets and dashboards that Tableau needs to render
simultaneously.
o Avoid applying too many filters, and prefer context filters when working with
complex filtering logic.
o Filter out unnecessary data at the extract level to minimize the load on Tableau.
ANJIRAJU
5. Tools for Performance Monitoring and Analysis
1. Performance Recording:
o Tableau includes a Performance Recording feature that allows you to track and
analyze the performance of your workbook. You can use this to identify slow
queries, long-running calculations, and other performance bottlenecks.
o For tables with large datasets, creating indexes on columns frequently used in
filters, joins, or aggregations (such as ID, Date, Region, or Product ID) can
improve performance.
o Example: If you filter data by Product Category and Order Date frequently,
ensure these columns are indexed in the database.
ANJIRAJU
• Composite Indexes:
o When multiple fields are used together in filters or joins (e.g., Region and
Product Category), you can create composite indexes. A composite index
includes more than one column and helps speed up multi-column queries.
• Avoid Over-indexing:
o Too many indexes can slow down database write operations (e.g., inserts or
updates). Therefore, carefully choose which columns need indexing based on
query patterns.
• Database Partitioning:
o Partition your tables by frequently used filters (e.g., partitioning sales data by
year) to further optimize performance. Partitioning helps databases skip
irrelevant sections of data, speeding up query times.
o Apply filters when creating extracts to limit the data loaded into Tableau. This
reduces the size of the extract file and improves performance when working with
large datasets.
o Example: Filter out data for specific regions, time periods, or categories if not
needed.
• Example:
o If your dataset includes global sales data, but you only need data for North
America for your analysis, apply an extract filter to load only the North America
region.
ANJIRAJU
o Apply filters directly to the data source level to reduce the dataset before
Tableau even starts analyzing it. This will filter out irrelevant rows from the
dataset as soon as it’s loaded into Tableau.
o Example: Filter out outdated or irrelevant data (e.g., sales data from 5 years ago).
• Context Filters:
o Set up context filters in Tableau to limit the data that subsequent filters will
operate on. Context filters create a temporary data subset that can be used by
other filters, making them more efficient.
o Example: If you filter by Region in your dashboard, set Region as the context filter
to improve the performance of other filters (such as Product Category).
o In some cases, you can optimize performance by pre-filtering your data at the
database level using custom SQL queries before Tableau even receives the data.
o Example: Use SQL queries to filter records for a specific date range, reducing the
amount of data transferred into Tableau.
o Many databases (like SQL Server, PostgreSQL, etc.) are highly optimized for
filtering operations. Writing efficient filtering logic in SQL queries allows the
database to handle the heavy lifting.
• Pre-Aggregate Data:
o If possible, aggregate the data at the source level (e.g., summing up sales by
region) and load the aggregated data into Tableau. This reduces the volume of
data Tableau needs to process.
ANJIRAJU
o Avoid using multiple layers of table calculations in the same view, as they can
become computationally expensive.
o Where possible, use built-in aggregate functions like SUM(), AVG(), COUNT(), or
MIN() in Tableau, as these are more efficient than table calculations.
• Pre-Aggregate in SQL:
o Move heavy calculations, like running totals or averages, into the SQL query or
into the database itself. This way, Tableau can work with pre-aggregated data
instead of recalculating everything on the fly.
o Example: Calculate moving averages or sums at the database level using SQL,
then load the results into Tableau for visualization.
o Level of Detail (LOD) expressions like FIXED, INCLUDE, and EXCLUDE allow you
to calculate aggregations at a specific granularity without relying on table
calculations.
o FIXED LOD expressions, in particular, can help reduce the need for complex
table calculations by allowing you to pre-calculate values at a given level of
detail, regardless of the view.
o Example: To calculate the total sales per product, use a FIXED expression like:
ANJIRAJU
Improving Dashboard Performance in Tableau:
Optimizing Tableau dashboards for large datasets is essential to ensure smooth performance,
faster load times, and a better user experience. Large datasets, complex calculations, and
heavy interactivity can slow down dashboards, especially when there are many elements
involved. Here’s a guide with tips on optimizing Tableau dashboards for large datasets, including
layout strategies, background images, and reducing interactivity load times.
o A dashboard with too many visualizations can increase load time. Limit the
number of sheets on a dashboard to only those that are essential for the
analysis.
ANJIRAJU
o Limit the scope of your analysis by focusing on key metrics. Avoid overloading
the dashboard with too many data points or complex visualizations that can
distract from the main objective.
o Tiled layouts are generally more efficient than floating elements, as Tableau
can more easily optimize the layout for rendering. Floating elements require
more complex calculations to position and render, which can slow down the
dashboard.
o Optimize the dashboard for different devices (desktop, tablet, mobile) to ensure
the best user experience. Tableau allows you to create device-specific layouts
that are tailored to fit the screen size and capabilities of each device.
o For mobile users, simplify the dashboard by reducing the number of visual
elements, hiding non-essential filters, and ensuring the layout is clear and
accessible.
o Quick filters can be very useful but can negatively impact performance when
there are too many or when the filter is applied to large datasets. Limit the
number of filters used or set them to a default selection to reduce the load.
o Instead of using multi-select or slider filters that require more processing, opt for
single-value dropdown filters which are generally more efficient for large
datasets.
o When multiple filters are applied, Tableau recalculates all filter conditions.
Context filters create a temporary dataset that is used by all other filters,
reducing the overall number of recalculations.
o Example: Set a context filter for the region to speed up performance when
applying multiple filters for product category, time, and other dimensions.
ANJIRAJU
o Show/Hide containers, often used for interactivity, can slow down dashboards
because they require Tableau to recalculate each time a container’s state
changes. Use this functionality sparingly, especially with large datasets.
o When possible, avoid using show/hide containers for complex elements like
large tables or multiple visualizations.
• Pre-aggregate Calculations:
o If you are using complex calculated fields in your dashboard, try pre-aggregating
the calculations either in the data source or by using extracts. Avoid applying
complex calculations dynamically on large datasets.
o Whenever possible, create calculations directly in the data source (e.g., using
SQL) rather than within Tableau. This reduces the computation load on Tableau
and speeds up performance.
o Large background images can significantly impact performance. Make sure that
images are optimized for web display by reducing file size without losing quality.
▪ Use image formats like JPEG or PNG, as these are generally more
lightweight than other formats like TIFF or BMP.
o If you are using images for background overlays, ensure they are simple and not
overly detailed. Complex or high-resolution images can negatively affect
performance.
o Instead of placing a large image or solid color as the background, opt for
transparent backgrounds. This reduces unnecessary loading of heavy visual
elements.
ANJIRAJU
4. Managing Large Datasets
4.1. Use Data Extracts Instead of Live Connections
• Extracts are much faster than live connections, especially for large datasets, because
they are pre-aggregated and stored locally.
o Best Practice: If your dataset is large and doesn’t change frequently, use an
extract rather than a live connection.
• Optimize Extracts:
o Apply filters when creating extracts to only include relevant data (e.g., last 12
months of data). This helps reduce the size of the extract and improves
performance.
o If possible, aggregate the data at the source level (e.g., sum sales by region)
instead of doing it within Tableau. This reduces the volume of data Tableau
needs to process.
o Level of Detail (LOD) expressions such as FIXED, INCLUDE, and EXCLUDE can
be used to aggregate data at a specified level, reducing unnecessary granularity
in your visualizations and speeding up performance.
o Apply filters directly at the data source level to reduce the volume of data that is
being loaded into Tableau. For example, filter out irrelevant records or exclude
outdated data before it enters Tableau.
o Where possible, consolidate data sources into a single source or use data
relationships instead of traditional joins. Using multiple data sources can
increase the time Tableau takes to query data and render the dashboard.
ANJIRAJU
5.3. Optimize with Performance Recording
To work efficiently in Tableau, it's crucial to leverage keyboard shortcuts, optimize frequent
actions, and utilize time-saving tricks. These tips will streamline your workflow and help you
build dashboards faster and more effectively.
ANJIRAJU
2. Time-Saving Tricks for Frequent Actions
2.1. Drag-and-Drop Efficiency
• Drag Dimensions/Measures Directly: Drag fields directly from the Data Pane into rows,
columns, filters, or onto the canvas instead of clicking through menus.
• Create Quick Filters: Drag a field onto the Filters Shelf, and then right-click the filter in
the Filters Shelf to make it a quick filter instantly.
• Duplicate Fields: Right-click a calculated field or dimension and duplicate it to test new
logic or create variations without altering the original.
• Set Default Aggregations: Right-click a measure in the Data Pane, select Default
Properties → Aggregation, and choose a default (e.g., SUM, AVG). This saves time when
dragging the field to the canvas.
• Use Context Filters: Right-click a filter and set it as a Context Filter to reduce the
number of rows processed by subsequent filters.
• Apply Filters Across Worksheets: Use the Apply to Worksheets option to apply a filter
across all relevant worksheets, saving you from recreating the same filter multiple
times.
• Rename Fields in Bulk: Multi-select fields in the Data Pane, right-click, and choose
Rename to batch-edit names for consistency.
• Batch Format Fields: Use the Format Pane (Ctrl + Shift + F) to adjust fonts, colors, and
alignments for multiple fields simultaneously.
• Drag Fields into Calculations: Instead of typing field names, drag them into the
calculation editor for accuracy and speed.
• Use Suggestions: Tableau provides suggestions as you type calculations. Use these to
quickly complete formulas.
ANJIRAJU
• Leverage Dynamic Parameters: Use dynamic parameters to automatically update
values based on data changes. For instance, dynamically update a list of dates for a
parameter controlling time filters.
• Show Gridlines: Use the gridlines feature to align objects consistently in your
dashboard. Access it via Format → Gridlines.
• Start with a Template: Use a pre-designed dashboard template to save time on layout
and formatting. Many templates are available online or can be created and reused
within your team.
• Use Show/Hide Buttons: Add buttons for hiding or showing containers to save space
and improve user interaction.
• Use Actions: Replace multiple quick filters with Filter Actions to reduce clutter and
improve performance.
• Pivot Columns into Rows: Multi-select columns in the Data Pane, right-click, and
choose Pivot to restructure your data quickly.
• Use Split: Right-click a field and select Split to separate data into new fields based on a
delimiter (e.g., splitting names into first and last).
• Use Data Extracts: Convert live data connections into extracts for faster performance,
especially for large datasets. Set up extract filters to minimize the data size.
• Aggregate data at the source level (e.g., using SQL or data preparation tools) to reduce
the amount of processing Tableau needs to do.
ANJIRAJU
6. Best Practices for Performance
6.1. Leverage Performance Recording
• Replace complex table calculations with Level of Detail (LOD) expressions for better
performance.
• Reuse Color Palettes: Save custom color palettes in the Preferences.tps file for
consistency across projects.
• Use Tooltips for Context: Add contextual information to tooltips to reduce the need for
additional visualizations.
• Snapshot Current State: Export the current state of your workbook as a packaged
workbook (.twbx) to share or archive progress.
THANK YOU
ANJIRAJU