Notifications

No notifications

Tableau — Visual Analytics for Business Intelligence

Tableau is the industry-leading visual analytics platform, known for its drag-and-drop interface and ability to handle millions of rows. It turns complex data into interactive dashboards that anyone can explore.

Tableau Editions

EditionCostBest For
Tableau PublicFreePortfolio building, public datasets
Tableau DesktopLicensedEnterprise analysis, private data
Tableau Server/CloudLicensedTeam collaboration, governance

Core Concepts

ConceptDefinitionExample
DimensionsCategorical/qualitative fields (blue pills)Region, Category, Date
MeasuresQuantitative fields (green pills)Sales, Profit, Quantity
Marks CardControls visual encodingColor, Size, Label, Detail, Tooltip
FiltersRestrict data shownDate range, Top N, conditional
ParametersUser-controlled variables"Select metric" dropdown

Calculated Fields — Tableau's Formula Engine

// Profit Ratio
SUM([Profit]) / SUM([Sales])

// CASE statement for categorization CASE [Region] WHEN "East" THEN "Eastern Division" WHEN "West" THEN "Western Division" ELSE "Other" END

// Date calculation DATEDIFF('month', [Order Date], TODAY())

LOD Expressions — Level of Detail Control

LOD expressions compute at a different granularity than the visualization:

LOD TypeSyntaxUse Case
FIXED{FIXED [Region] : SUM([Sales])}Ignore viz filters, compute per region
INCLUDE{INCLUDE [Customer] : AVG([Sales])}Add detail not in viz
EXCLUDE{EXCLUDE [Month] : SUM([Sales])}Remove detail from viz

LOD expressions are Tableau's superpower — they let you answer questions like "What is each customer's first purchase date?" or "How does each store compare to its regional average?"

On this page

Detailed Theory

Tableau is the drag-and-drop king of BI: connect to data, drop fields onto Rows / Columns / Marks, and a chart appears. Underneath, Tableau is writing optimised SQL for you. The skill is learning the mental model so you can build complex dashboards without fighting the tool.

What Tableau Actually Is

Three pieces of the ecosystem:

ToolJob
Tableau Desktopauthor workbooks
Tableau Server / Cloudshare & govern
Tableau Prepvisual ETL (clean & shape data)

Files: .twb (workbook only), .twbx (workbook + extract), .hyper (Tableau's columnar extract format).

The Mental Model: Dimensions vs Measures

  • Dimensions — categorical / discrete (blue pills). Slice the data: Region, Product, Date.
  • Measures — numeric / continuous (green pills). Aggregated by default: Sales, Profit, Quantity.
  • Drop a dimension on Rows/Columns → you get groupings.
  • Drop a measure → it gets aggregated (SUM by default).
  • Drop fields onto Marks (Color, Size, Label, Tooltip, Detail) to encode more data into the same chart.
Columns: [Order Date]   ← continuous → axis
Rows:    SUM(Sales)
Marks > Color: [Region]

That's a multi-line revenue trend by region — built without writing a single query.

Beginner Mistakes to Skip

1. Live connection to a transactional DB — slow + risky. Use an Extract (.hyper) unless you genuinely need real-time. 2. Quick filters everywhere. Each one re-queries the data source. Use Context filters + action filters instead. 3. Over-using dual-axis charts. Often misleading. Try side-by-side panels. 4. No Show Me discipline. "Show Me" is great for exploration; for dashboards build the chart deliberately on Rows/Columns. 5. Ignoring the data type icons. A date stored as string won't give you year/quarter/month drilldown. Right-click → Change Data Type. 6. Not aliasing the workbook. Cryptic field names (f_amt_lcl) reach the dashboard. Rename in the data pane.

Intermediate: Discrete vs Continuous (Blue vs Green)

Independent of dimension/measure: any field can be discrete (blue, makes headers) or continuous (green, makes axes).

  • Year of [Order Date] as discrete → header columns 2024 / 2025 / 2026.
  • Year of [Order Date] as continuous → continuous time axis.
This duality is why Tableau feels powerful but confusing. Always ask: do I want headers or an axis?

Intermediate: Calculated Fields

Profit Ratio = SUM([Profit]) / SUM([Sales])
Is Top Region = IF [Region] = 'West' THEN 'Top' ELSE 'Other' END
Days Since Order = DATEDIFF('day', [Order Date], TODAY())

Key rule: an aggregate (SUM, AVG) and a non-aggregate can't mix in the same calc. Wrap both sides or use an LOD.

Intermediate: Parameters & Sets

  • Parameters — single-value input the user changes (e.g. "Top N customers = 10"). Used in calcs.
  • Sets — dynamic groups (e.g. "customers above $10k"). Toggle membership in/out of a view.
  • Actions — clicks on one viz filter / highlight / navigate to another (the secret to interactive dashboards).

Intermediate: Dashboards & Layout

  • Use Tiled layout containers (horizontal / vertical) for responsive sizing.
  • Pick a fixed device-specific size (e.g. 1366×768) when designing for executives.
  • One headline KPI strip at the top, one trend in the middle, one breakdown below — proven pattern.
  • Hide unused legends, use tooltips for detail rather than cramming labels.

Advanced: LOD Expressions (Level of Detail)

LODs let you compute aggregations at a *different* granularity than the view. Three flavours:

{ FIXED [Customer ID] : MIN([Order Date]) }   -- per customer, ignores all dim filters
{ INCLUDE [Customer ID] : SUM([Sales]) }       -- view granularity + Customer ID
{ EXCLUDE [Month] : SUM([Sales]) }              -- view granularity minus Month

  • FIXED — "per X regardless of view" (cohort analysis, customer first-order date).
  • INCLUDE — finer than view (avg sales per customer, then averaged per region).
  • EXCLUDE — coarser than view (% of region inside a month-level view).

Advanced: Tableau's Order of Operations

When filters and LODs collide, this order decides who wins:

1. Extract filters
2. Data-source filters
3. Context filters
4. FIXED LODs                ← computed before dim filters
5. Dimension filters
6. INCLUDE / EXCLUDE LODs
7. Measure filters
8. Table calculations         ← run last, on the visible result

Gotcha: {FIXED [Region]: SUM([Sales])} ignores a Category filter (step 4 < step 5). Promote the Category filter to Add to Context to make it apply.

Advanced: Table Calculations

Run on the *visible* result set, not the data source. Perfect for:

  • Running totals (RUNNING_SUM(SUM([Sales])))
  • Moving averages (WINDOW_AVG(SUM([Sales]), -2, 0))
  • % of total (SUM([Sales]) / TOTAL(SUM([Sales])))
  • Year-over-year ((ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1)) / ABS(LOOKUP(ZN(SUM([Sales])), -1)))
Control direction with Compute Using (Table across, Pane down, Specific dimensions) — this is where most table-calc bugs live.

Advanced: Performance

  • Use Extracts (.hyper) instead of live connections.
  • Hide unused fields, aggregate the extract, filter it at source.
  • Avoid COUNTD on huge dimensions — it's expensive.
  • Use context filters to shrink the dataset before the rest of the pipeline runs.
  • Profile with Performance Recording (Help → Settings → Performance Recording).

Advanced: Publishing & Governance

  • Publish the data source separately from the workbook so multiple workbooks share it.
  • Use Tableau Prep flows for repeatable cleaning pipelines.
  • Apply Row-Level Security with a user-filter calc: USERNAME() = [Sales Rep].
  • Schedule extract refreshes off-hours; alert on extract failures.

Practice Path

1. Connect to Sample Superstore. Build a sheet with Order Date on Columns, Sales on Rows, Region on Color — read off the seasonality. 2. Add a parameter "Top N" + a calc to filter to the top N products by Sales. 3. Write a FIXED LOD for "Customer First Order Date" and use it to label new vs returning customers. 4. Build a dashboard with KPI strip + trend + breakdown, wire one chart to filter another with a Dashboard Action.