Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Tableau and visualisation tools

Practical study notes on Tableau and other visualisation tools, covering definitions, core concepts, key syntax, examples, exam tips and common mistakes for university exams.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Two sentences: Engineers use Tableau and similar visualisation tools to turn raw data into interactive charts, dashboards and reports that support decision-making. Learning these tools helps you communicate findings clearly to managers, peers and stakeholders, and implement visual analytics workflows in industry projects.

Key ideas

  • Worksheet — a single visual view (chart) built from data. A dashboard is a composed layout of multiple worksheets and controls. A story is a sequence of sheets presented as a narrative. In a worksheet, shelves (Rows, Columns, Filters, Pages) and the Marks card (Color, Size, Label, Detail, Tooltip) control visual encoding; Show Me suggests appropriate chart types; Measure Names and Measure Values are special fields used to plot multiple measures.

  • Dimension — a categorical or discrete field used to slice data (examples: Region, Product, Date when used as a category). Dimensions define levels of detail on the view.

  • Measure — a quantitative field (usually numeric) that can be aggregated; it can be continuous or discrete depending on how you use it (examples: Sales, Quantity). Measures are the values plotted on axes and are typically aggregated (sum/average, etc.).

  • Aggregate — a summary calculation over a set of rows, e.g., SUM, AVG, COUNT. When you place a measure on a shelf, Tableau aggregates it by default (unless you disaggregate by unchecking Analysis -> Aggregate Measures).

  • Mark — the graphical primitive that represents data in a view (bars, lines, points, area). Visual encoding maps data fields to mark properties: position, length, color, size, shape, and text.

  • VizQL — short for Visual Query Language. Tableau translates drag-and-drop actions into a declarative query and visual encoding commands, then renders a visualization.

  • Calculated field — a user-defined expression that creates a new field from existing fields, using functions and operators. Syntax examples appear in the Formulas section.

  • Level of Detail (LOD) expression — a calculation that fixes aggregation at a specified dimensionality. There are three LOD types: FIXED, INCLUDE, EXCLUDE. For example, { FIXED [Region]: SUM([Sales]) } computes sales per Region irrespective of view level. FIXED LODs are evaluated after context filters and before dimension filters; INCLUDE/EXCLUDE are computed as part of the viz query and therefore respect dimension filters. Examples: { INCLUDE [Product]: SUM([Sales]) } and { EXCLUDE [Product]: SUM([Sales]) }.

  • Filter — a mechanism to restrict rows or aggregated results shown in a view. Filters can be applied as Extract filters, Data Source filters, Context filters, Dimension filters (including Top N/Conditional), Measure filters, or Table Calculation filters. Context filters define the domain used by dependent filters and for FIXED LODs; table calc filters act last among filters.

  • Parameter — a single value input that substitutes into calculations, filters or reference lines. Parameters are static until changed by the user or an action.

  • Data connection modes — Live connection queries the data source directly on demand; Extract stores a snapshot for faster local performance in a Tableau Hyper file (.hyper).

  • Data blending vs. join — Join/Relationship combines tables within a single data source (cross-database joins are supported; relationships are the recommended logical-layer method). Blend links aggregates from different data sources using a primary/secondary setup on common fields and behaves like a left join at the aggregated level (useful when sources cannot be joined).

  • Pre-attentive attributes — visual properties perceived quickly without focused attention (e.g., color hue, orientation, size, shape). Use them for effective highlights.

  • Data-ink ratio — from Edward Tufte: the proportion of ink used to display data versus total ink on the graphic. Higher ratio removes unnecessary decorations. Exact statement: Data-ink ratio = (data-ink) / (total ink used to print the graphic).

What to draw when asked for a diagram: to explain a dashboard layout draw a rectangle for the dashboard area, subdivide into panels and label each panel with sheet names; draw arrows for filter actions (source sheet -> target sheet) and label them with the filter field.

Assumptions commonly made in exam questions: data tables have correctly typed fields (measures numeric, dimensions categorical); time-series have uniform time granularity unless specified.

Formulas

For a tools/topic like Tableau, list the key syntax to remember (each on its own line): SUM([Field]) — sum of values in Field; use when Field is numeric and you want total. AVG([Field]) — arithmetic mean of Field values. COUNT([Field]) — count of non-null rows for Field. COUNTD([Field]) — count distinct values in Field. IF <condition> THEN <expr1> ELSE <expr2> END — conditional calculation (use boolean expressions on the condition). CASE [Field] WHEN 'A' THEN 1 WHEN 'B' THEN 2 ELSE 0 END — multi-way conditional. DATEPART('month', [Order Date]) — extract month number from a date; common date parts: 'year', 'quarter', 'month', 'day'. DATETRUNC('month', [Order Date]) — floor date to start of the month. WINDOW_SUM(SUM([Sales]), -[n], 0) — table calculation summing current and previous n rows (where [n] is an integer parameter or a field that yields an integer offset; window functions require a compute-by direction). { FIXED [Dim1], [Dim2]: SUM([Measure]) } — LOD expression fixed per Dim1 and Dim2. ATTR([Field]) — returns a value if the field is the same for all rows in the current level, otherwise * (useful in tooltips/labels). ZN([Field]) — returns zero when Field is null; helpful before sums.

Units: these are syntactic constructs, not SI units. Use them when building calculated fields, table calculations and LODs in Tableau.

Worked examples

Example 1 — Bar chart and percent-of-total using LOD Question: From a sales table with fields Date, Region, Product, Sales (INR), create a bar chart of total Sales by Region and show each bar's percent of grand total. Answer (steps, exact):

  1. Drag Region to Columns and SUM([Sales]) to Rows — this creates a bar chart with one bar per Region.
  2. Create a calculated field named Total Sales (All Regions) with formula: { FIXED : SUM([Sales]) } — this LOD computes the grand total sales across the whole data set. Note: FIXED LODs respect only context/data source filters; if you want percent-of-total to reflect current dimension filters, add those filters to context or use a table calculation such as TOTAL(SUM([Sales])).
  3. Create Pct of Total = SUM([Sales]) / [Total Sales (All Regions)].
  4. Drag Pct of Total to Label and format as percentage with one decimal.
  5. Result: bars sized by SUM(Sales), labels show percent of grand total. Final check: if Sales in INR = 1,25,00,000 and East region sum = 25,00,000 then Pct = 25,00,000 / 1,25,00,000 = 0.20 = 20% (show units INR in tooltip).

Example 2 — Dashboard with filter actions (model-answer to long question) Question: Describe how to design a dashboard that lets a user click a region to filter a sales trend chart and a product table. Answer (model):

  1. Create three worksheets: Map or Bar by Region (Sheet A), Time series Sales by Month (Sheet B), Product detail table (Sheet C).
  2. Create a dashboard and place A left, B top-right, C bottom-right. Add a single filter control for Region on top if desired.
  3. Add a dashboard action: Dashboard -> Actions -> Add Action -> Filter. Source sheet: A. Target sheets: B and C. Run action on: Select (or Hover). Clearing the selection: Show All Values.
  4. Test: clicking a region in A sends the selected Region value to B and C, filtering their underlying queries. Explain context filters if performance issues occur. Note accessibility: provide clear labels and color legend.

Example 3 — Short comparison (theory model answer) Question: Compare Tableau and Power BI briefly and state when to choose each. Answer (model):

  • Tableau focuses on visual analysis, fast prototyping, broad data source support, and a strong visual-analytics workflow; it uses VizQL. Power BI integrates tightly with Microsoft stack, offers lower entry cost, and strong report-authoring for enterprise BI. Choose Tableau for exploratory visual analytics and flexible visuals; choose Power BI for cost-sensitive Microsoft-centric reporting and embedding in Office ecosystems.

Common mistakes

  • Forgetting compute-by direction for WINDOW_ and other table calculations: results wrong if you do not set partitioning and addressing.
  • Applying filters in the wrong order: using a non-context filter that removes rows needed for a dependent filter.
  • Overloading dashboards with too many colours, legends or decorative elements (low data-ink ratio) making interpretation hard.
  • Not checking data types: dates parsed as strings will break time-series functions.

For your exam

Kinds of questions:

  • Definitions: short definitions of workbook, worksheet, dimension, measure, LOD, VizQL.
  • Short notes: differences between live and extract connections, context filters, data blending vs join.
  • Derivations/explanations: explain how LOD expressions are evaluated relative to view level; sketch the order of operations (extract filters and data source filters -> context filters -> FIXED LOD -> dimension filters incl. Top N/Conditional -> INCLUDE/EXCLUDE LOD (part of the viz query) -> measure filters -> table calculation filters -> view).
  • Numericals/steps: build a given chart and compute percent-of-total or running totals (show LOD or table calc used).
  • Diagrams: draw dashboard layout and label filter actions and parameter controls. What full-marks answers include:
  • Precise definition (bold term), an explanation in plain language, the exact Tableau syntax or step sequence, and a small example with numbers or a short screenshot description (if diagram requested, label every element). For algorithmic or order-of-operations questions, list operations in correct order and explain where LOD and table calculations occur.

Quick check

  1. What is a calculated field in Tableau?
  2. Name the three types of LOD expressions.
  3. Which Tableau construct would you use to let the user change a threshold value used in many charts?

Answers: 1) A user-defined expression that creates a new field from existing fields using functions and operators. 2) FIXED, INCLUDE, EXCLUDE. 3) A Parameter.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?