Data Visualization and Storytelling with Tableau and Power BI

Chapter 4
Tableau Foundations and Analytical Workflow

Diploma in Business Analytics
Data Visualization and Storytelling with Tableau and Power BI   •   Diploma

Tableau Foundations and Analytical Workflow

Introduction

Tableau is a visual analytics platform used to connect to data, explore patterns, construct interactive views, and communicate evidence for decisions. Its central design principle is direct manipulation: analysts select fields and place them on shelves, cards, and panes, while Tableau generates a visual query and renders the result.

A Tableau workbook normally contains one or more worksheets, dashboards, and stories. A worksheet is the basic analytical unit. It contains a view built from data fields, while a dashboard combines several views and interactive controls. A story presents a sequence of views or dashboards to support an explanatory narrative.

Tableau is powerful because it separates data preparation, analytical structure, and visual presentation. It is not, however, a substitute for data governance or statistical reasoning. A polished chart can still communicate a misleading result if the data grain, aggregation, filters, or relationships are misunderstood.

Learning Objectives

By the end of this chapter, students should be able to:

  1. Identify the major areas of Tableau’s interface.
  2. Connect Tableau to files, databases, and published data sources.
  3. Distinguish live connections from extracts.
  4. Explain relationships, joins, and data grain.
  5. Classify fields as dimensions or measures and discrete or continuous values.
  6. Build hierarchies and use shelves, cards, and filters to construct worksheets.
  7. Explain Tableau’s order of operations and its implications for analysis.
  8. Apply a disciplined workflow to a realistic business problem.

1. Tableau’s Analytical Environment

Workbooks and worksheets

A workbook is the Tableau file that stores data connections, calculated fields, worksheets, dashboards, stories, formatting, and metadata. A worksheet is a single view, such as monthly sales by region. A dashboard is a coordinated collection of worksheets. A story is a sequence of sheets or dashboards used to guide an audience through an argument.

A worksheet typically contains:

  • a data source;
  • fields selected from the Data pane;
  • shelves such as Rows, Columns, and Filters;
  • cards such as Marks, Pages, and sometimes Filters;
  • a visual canvas showing the resulting view.

The principal interface areas

The Data pane lists tables and fields. It commonly separates fields into Dimensions and Measures. The Analytics pane provides analytical objects such as reference lines, trend lines, distributions, and forecasts. The Rows and Columns shelves define the broad structure of a view. The Marks card controls mark type, colour, size, shape, label, detail, and tooltip. The Filters shelf restricts the data included in a view. The Pages shelf can display a sequence of values one page at a time.

The status bar often reports the number of marks, selected values, and summary statistics. The toolbar provides controls for undoing actions, sorting, highlighting, filtering, and displaying the view. These elements should be read as an analytical interface rather than merely as formatting tools: moving a field can change the question being answered.

2. Connecting to Data

Tableau can connect to spreadsheets, text files, statistical files, relational databases, cloud platforms, published Tableau data sources, and other supported systems. A connection has two important aspects:

  1. The source location and technology: where the data resides and how it is accessed.
  2. The logical and physical model: how tables are related, joined, unioned, or otherwise combined.

Before building a chart, inspect the data source. Important checks include:

  • What does one row represent?
  • Which fields uniquely identify a row?
  • Are dates stored as dates or as text?
  • Are measures numeric and consistently scaled?
  • Are nulls meaningful, missing, or erroneous?
  • Is the data refreshed regularly?
  • Are sensitive fields exposed unnecessarily?

Live connections and extracts

A live connection queries the underlying source when Tableau needs data. This can provide current information and preserve database security or governance controls, but performance depends on the source, network, query complexity, and concurrent use.

An extract is a Tableau-managed, optimized snapshot of data. Extracts can improve responsiveness, support work while disconnected, and reduce repeated load on operational systems. Their disadvantages include storage requirements, refresh management, and possible staleness. An extract is not automatically more accurate than a live connection; accuracy depends on refresh and data preparation.

ConsiderationLive connectionExtract
FreshnessUsually current to source availabilityCurrent only as of last refresh
PerformanceDepends on source and networkOften fast for analytical queries
Offline useGenerally limitedOften possible
GovernanceSource permissions may apply directlyExtract access and refresh require control
Operational impactQueries may affect source workloadRefreshes and extract storage require planning

Extract design should be deliberate. Remove fields that are not needed, apply safe filters where appropriate, select suitable refresh schedules, and document the refresh time. A published dashboard should make the data freshness expectation clear.

3. Data Model: Relationships, Joins, and Grain

Tableau’s logical data model allows tables to be connected through relationships. A relationship describes how tables correspond without necessarily flattening them into one physical table before analysis. Tableau can determine which tables are needed for a particular view and can help preserve the level of detail of each table.

A join is a more explicit operation that combines rows according to a join condition, such as matching CustomerID in two tables. Common join types are inner, left, right, and full outer joins. Joins can create duplicated rows when the join keys are not unique on both sides.

For example, suppose an Orders table contains one row per order and a Targets table contains one row per region and month. If Targets is joined to Orders only by Region, each target row may repeat across many orders. A subsequent sum of Target may therefore be inflated. The analyst must establish the grain of each table and use join keys that reflect the intended relationship.

A relationship is not permission to ignore grain. A reliable workflow is:

  1. State the grain of each table in plain language.
  2. Identify candidate keys and foreign keys.
  3. Check whether keys are unique where expected.
  4. Test row counts and totals before and after combining tables.
  5. Validate the result with a small known example.

A useful diagnostic

If a measure changes unexpectedly after adding a field from another table, investigate the model before changing the aggregation. The problem may be row multiplication rather than a Tableau calculation error.

4. Dimensions, Measures, and Field Roles

A dimension is generally used to categorize, segment, or label data. Examples include Region, Product Category, Customer Type, and Order Date. A measure is generally numeric and can be aggregated, such as Sales, Quantity, Cost, or Profit.

This distinction is functional rather than purely mathematical. A numeric CustomerID may be a dimension because it identifies customers rather than representing a quantity to add. Conversely, a date may be used as a discrete category or as a continuous time axis.

Discrete and continuous fields

A discrete field creates separate headers or panes. It is commonly shown in blue in Tableau’s standard interface. A discrete Month field may produce one column for January, one for February, and so forth.

A continuous field creates an axis and represents a numerical range. It is commonly shown in green. A continuous date can produce a time axis, while a continuous measure can produce a quantitative scale. The same underlying field can be used either way, depending on the analytical question.

Aggregation

When a measure is placed in a view, Tableau usually aggregates it. Common aggregations include SUM, AVG, MIN, MAX, COUNT, and COUNTD. For a measure x with n observed values, the arithmetic mean is:

x̄ = (∑ᵢ₌₁ⁿ xᵢ) ÷ n

Here, xᵢ is an observed value and n is the number of included observations. This formula assumes each observation receives equal weight and that the values are appropriate for averaging. An average of order-level sales is not necessarily the same as average sales per customer, because the unit of analysis differs.

The default aggregation should always be questioned. Summing a ratio, averaging percentages without appropriate weights, or counting rows instead of distinct entities can produce an invalid conclusion.

5. Hierarchies and Analytical Decomposition

A hierarchy organizes related fields from broad to detailed levels. A common geographic hierarchy is Country → State → City. A time hierarchy may be Year → Quarter → Month → Day. Users can expand or collapse a hierarchy in a view to move between levels of detail.

Hierarchies support drill-down, but they do not automatically establish a valid statistical comparison. For example, drilling from Year to Month changes the time granularity and may reveal seasonality, incomplete periods, or operational effects. Analysts should explain what changes when the level of detail changes.

A hierarchy is especially useful in dashboards where executives begin with a summary and investigate exceptions. It should reflect a meaningful business structure rather than merely a convenient list of fields.

6. Building a Worksheet: A Professional Workflow

Consider a sales manager who wants to compare monthly sales and profit across regions.

Step 1: Define the question

The question should specify the measure, population, comparison, and time period: “How did monthly sales and profit vary by region during the financial year?” This is more useful than beginning with a chart type.

Step 2: Inspect the source

Confirm that Sales and Profit are numeric, Order Date is a valid date, Region is consistently coded, and the data includes the required financial year. Check whether rows represent orders, order lines, or transactions.

Step 3: Construct the view

Place Order Date on Columns and choose an appropriate date level, such as Month. Place Region on Rows. Place Sales on the Marks card or in the view and retain SUM(Sales) if a total is required. Add Profit to Colour or Label only when this improves interpretation. A dense combination of labels, colours, and marks can reduce readability.

Step 4: Add controlled filters

Place the financial year on Filters and select the required period. Add Region as a filter only if users need to restrict the analysis. A filter should answer a clear analytical need; excessive filters create hidden assumptions.

Step 5: Format and validate

Use meaningful titles, units, number formats, and tooltips. Compare a few displayed totals with an independent calculation or source report. Inspect nulls and outliers. Confirm that the view has not changed grain unexpectedly.

Step 6: Explain the result

A view becomes part of a data story when the analyst identifies the relevant pattern, its likely explanation, and the decision it informs. “Region A was highest” is descriptive. “Region A led sales but had declining profit margins in the final quarter, suggesting a need to investigate discounting or cost changes” is more decision-oriented, provided the evidence supports it.

7. Shelves, Cards, and Marks

The Rows and Columns shelves establish the view’s structure. Placing a discrete dimension on Rows creates headers; placing a continuous measure on Columns commonly creates an axis. The Marks card determines how data is encoded.

  • Type: bar, line, circle, map, text, and other mark types.
  • Colour: categorical distinction or quantitative intensity.
  • Size: relative magnitude; use cautiously because area and volume can be difficult to compare.
  • Label: textual values displayed on marks.
  • Detail: adds granularity without necessarily changing the visible encoding.
  • Tooltip: supplementary information shown on hover.

Adding a field to Detail can increase the number of marks. This may reveal underlying variation, but it can also make a view slow or visually cluttered. A good analyst treats the number of marks as a design and performance decision.

8. Filters and Tableau’s Order of Operations

Filters are not all evaluated at the same stage. The order of operations explains why changing a filter type can change a result. A simplified sequence is:

  1. Extract filters and data-source filters.
  2. Context filters.
  3. Sets and fixed-level-of-detail expressions in relevant cases.
  4. Dimension filters.
  5. Measure filters.
  6. Table calculations.

The exact behavior depends on the feature and calculation type, so this sequence is a practical model rather than a substitute for feature-specific documentation. The key principle is that earlier operations define the data available to later operations.

Dimension filters

A dimension filter restricts categorical or discrete values, such as Region = “West.” A regular dimension filter is generally evaluated after context filters and before measure filters and table calculations.

Measure filters

A measure filter restricts aggregated results, such as SUM(Sales) greater than a threshold. It is applied after aggregation. It therefore differs from filtering individual rows before aggregation.

Context filters

A context filter creates a primary subset on which subsequent filters can operate. Context can be useful when a dependent filter should be evaluated within a restricted population, or when a top-N analysis must be based on a selected subset. Context filters may add processing overhead, so they should be used intentionally.

Table calculations

A table calculation operates on the results already present in the view. Examples include running totals, ranks, moving averages, and percent of total. Because table calculations occur late, a filter can remove marks before the calculation is performed. This is a frequent source of confusion.

Fixed-level-of-detail expressions

A fixed LOD expression specifies the dimensions at which a value is computed. For example, a customer-level calculation can remain at customer grain even when the view is organized by region. LOD expressions require careful consideration of filters and data relationships; they should not be used to conceal a poorly designed data model.

9. Worked Example: Why Filter Order Matters

Suppose a view displays sales by region and includes a table calculation for each region’s percent of total sales. Let Sᵣ denote sales for region r, and let R be the set of regions included in the view. The percentage is:

pᵣ = Sᵣ ÷ ∑ⱼ∈R Sⱼ × 100%

Here, Sᵣ is the sales of region r, and the denominator is total sales across the regions remaining in the view. The calculation assumes that all values use the same currency and that the denominator represents the intended comparison population.

If a regular Region filter removes the West region before the table calculation, the denominator excludes West, so the remaining regions’ percentages are recalculated to total 100%. If the analytical requirement is to show each selected region’s share of all-company sales, the analyst needs a different design, such as preserving the comparison population through an appropriate calculation or filter arrangement. The important lesson is that “percent of total” is not an intrinsic property of a region; it depends on the set of marks used as the denominator.

10. Illustrative Case: Regional Profitability Dashboard

Background

A fictional retail company, Northstar Home, sells through four regions. Managers report that sales are increasing, but they disagree about whether performance is improving because discounts and delivery costs vary by region.

Problem

The existing spreadsheet reports total sales by month but does not show whether regional growth is profitable. It also combines order-line data with monthly targets, causing some targets to be repeated when analysts join tables incorrectly.

Analysis

The analyst first documents the grain: the Orders table contains one row per order line, while the Targets table contains one row per region-month. A direct join on Region would duplicate each monthly target across many order lines. The analyst instead creates a relationship using Region and Month, validates target totals against the source system, and tests a small region-month sample.

The analyst then creates an extract for dashboard responsiveness, with a documented daily refresh. A worksheet shows monthly Sales by Region using a continuous date axis. A second worksheet shows Profit Margin by Region. If profit margin is defined as profit divided by sales, the calculation is:

Profit Margin = Profit ÷ Sales × 100%

This measure assumes Sales is non-zero and that Profit and Sales use compatible currency definitions and periods. It should not be computed by simply summing row-level margins.

A dashboard combines the worksheets with a financial-year filter. A carefully designed tooltip shows sales, profit, margin, and target variance. Managers can select a region and drill from year to quarter to month.

Outcome

The dashboard shows that West has the highest sales growth but declining profit margin, while North has slower sales growth and stable margin. Management investigates promotional discounts and freight costs in West rather than treating sales growth alone as success.

Learning points

  1. Data grain must be resolved before visual design.
  2. A relationship can be safer than an uncontrolled join, but it still requires validation.
  3. Ratios need a defensible numerator, denominator, and aggregation level.
  4. Filters and drill-down should reflect managerial questions.
  5. A dashboard is useful only when its data freshness and definitions are transparent.

11. Quality, Governance, and Responsible Use

Tableau workbooks can expose commercially sensitive information, personal data, or confidential performance indicators. Access should follow least-privilege principles. Row-level security may be required so that users see only authorized regions or customers. Published data sources should have owners, refresh documentation, definitions, and retention rules.

Analysts should avoid misleading visual practices, including truncated axes used to exaggerate differences, unexplained exclusions, inconsistent date ranges, and colour schemes that imply meaning without a legend. Accessibility matters: use sufficient contrast, descriptive titles, direct labels where practical, and alternatives to colour alone.

Tableau’s assisted analytics, natural-language features, forecasting, and automated explanations can accelerate exploration. They do not remove the need to verify calculations, investigate data quality, or distinguish correlation from causation. AI-generated explanations should be treated as hypotheses requiring human review, particularly in regulated or high-impact decisions.

12. Best Practices Checklist

  • Begin with a decision question, not a preferred chart.
  • Document table grain and key fields.
  • Validate relationships and joins with known totals.
  • Choose live or extract connections according to freshness, performance, and governance needs.
  • Distinguish dimensions, measures, discrete fields, and continuous fields.
  • Select aggregations that match the unit of analysis.
  • Use hierarchies to support meaningful exploration.
  • Apply filters deliberately and understand their order of evaluation.
  • Keep dashboards focused and accessible.
  • Label units, periods, definitions, and refresh times.
  • Test edge cases, nulls, zero denominators, and unusual values.
  • Maintain versioned documentation for published workbooks and data sources.

Chapter Summary

Tableau supports a workflow that moves from data connection and modeling to field selection, worksheet construction, filtering, validation, and communication. Live connections provide access to current source data, while extracts can improve performance and support controlled refreshes. Relationships and joins must be evaluated through table grain and key uniqueness because incorrect combinations can duplicate measures.

Dimensions categorize data and measures quantify it; both can be discrete or continuous depending on the intended view. Hierarchies enable structured movement from summary to detail. Shelves and Marks-card properties define the structure and visual encoding of a worksheet. Tableau’s order of operations explains why extract, context, dimension, measure, and table-calculation filters can produce different results. Professional Tableau practice combines technical fluency with validation, governance, accessibility, and clear decision-focused storytelling.

Key Terms

Workbook: A Tableau file containing connections, sheets, calculations, and presentation objects.

Worksheet: A single Tableau analytical view.

Dashboard: A coordinated collection of worksheets.

Story: A sequence of views or dashboards arranged for explanation.

Data source: The connected data and its metadata used by a workbook.

Live connection: A connection that queries the underlying source as needed.

Extract: A Tableau-managed snapshot optimized for analytical use.

Dimension: A field used to categorize, segment, or describe data.

Measure: A field representing a quantity that can usually be aggregated.

Discrete: A field treatment that creates separate headers or categories.

Continuous: A field treatment that creates an axis or uninterrupted range.

Hierarchy: An ordered organization of fields from broad to detailed levels.

Relationship: A logical association between tables based on related fields.

Join: A row-combination operation based on a specified condition.

Grain: The level of detail represented by one row or one observation.

Shelf: An interface area where fields are placed to define a view.

Marks card: A control area for mark type and visual encodings.

Context filter: A filter that defines a primary subset for later operations.

Table calculation: A calculation performed on results already represented in the view.

Level of detail: The dimensions that determine the granularity of a result.

Review Questions

Short Answer Questions

  1. What is the difference between a Tableau worksheet and a dashboard?
  2. Give two advantages and one limitation of an extract.
  3. Why is table grain important when combining data sources?
  4. Distinguish a dimension from a measure.
  5. What is the purpose of the Marks card?

Long Answer Questions

  1. Explain a professional workflow for creating and validating a Tableau worksheet.
  2. Compare relationships and joins, including the risk of duplicated measures.
  3. Explain how discrete and continuous fields affect the structure of a view.
  4. Describe Tableau’s order of operations and why it matters for filtering.
  5. Discuss governance and accessibility practices for a published Tableau dashboard.

Analytical / Application Questions

  1. A monthly target is repeated after an analyst combines it with order-line data. Diagnose the likely cause and propose a validation and redesign approach.
  2. A dashboard shows regional percent of total sales. Explain how removing a region with a regular filter changes the denominator and recommend how to preserve an all-company comparison.
  3. Design a worksheet and dashboard for a manager who wants to investigate high sales but declining profit margin. Specify the fields, hierarchy, filters, visual encodings, and validation checks you would use.

Multiple Choice Questions with Answers

Question 1

Which Tableau object is the basic unit used to create a single analytical view?

A. Dashboard

B. Worksheet

C. Story

D. Published data source

Correct Answer: B. Worksheet

Question 2

What is a principal characteristic of a Tableau extract?

A. It is always a real-time query of the operational database

B. It is a managed snapshot that can improve analytical performance

C. It cannot be refreshed

D. It automatically corrects inaccurate source data

Correct Answer: B. It is a managed snapshot that can improve analytical performance

Question 3

Why can joining a one-row-per-month target table directly to order-line data cause an incorrect target total?

A. Dates cannot be used in Tableau

B. The target rows may be repeated for multiple order lines

C. Measures cannot be aggregated

D. Relationships always remove targets

Correct Answer: B. The target rows may be repeated for multiple order lines

Question 4

Which field is most likely to be treated as a dimension?

A. Sales revenue

B. Units sold

C. Customer type

D. Shipping cost

Correct Answer: C. Customer type

Question 5

What does a continuous field generally create in a Tableau view?

A. A quantitative axis

B. Only a filter dialog

C. A workbook-level permission

D. A data extract

Correct Answer: A. A quantitative axis

Question 6

What is the primary purpose of a hierarchy?

A. To encrypt a data source

B. To organize fields for movement from summary to detail

C. To replace all joins

D. To force every measure to use SUM

Correct Answer: B. To organize fields for movement from summary to detail

Question 7

A measure filter on SUM(Sales) is generally applied to what?

A. Individual source rows before aggregation

B. Aggregated results

C. Workbook permissions

D. The extract refresh schedule

Correct Answer: B. Aggregated results

Question 8

If a percent-of-total calculation uses regional sales as its numerator, what determines its denominator?

A. The regions represented in the relevant view or calculation scope

B. The number of worksheets in the workbook

C. The colour assigned to each region

D. The file size of the extract

Correct Answer: A. The regions represented in the relevant view or calculation scope

Question 9

Which Marks-card property controls the categorical or quantitative colouring of marks?

A. Detail

B. Tooltip

C. Colour

D. Pages

Correct Answer: C. Colour

Question 10

What should an analyst do first when a measure changes unexpectedly after adding a field from another table?

A. Increase the number of dashboard colours

B. Investigate table grain, relationships, and possible row multiplication

C. Convert every field to a dimension

D. Delete all filters

Correct Answer: B. Investigate table grain, relationships, and possible row multiplication

Data Visualization and Storytelling with Tableau and Power BI
Chapter 4 of 14