Tableau from zero

A learning path for students who have never opened Tableau, with practice data. Work through it in order and you will be ready for an analytics take-home that asks for a Tableau Public link.

  1. 0What it is, set up
  2. 1Connect a CSV
  3. 2Blue and green
  4. 3First charts
  5. 4Sort and filter
  6. 5Calculated fields
  7. 6Table calcs
  8. 7LOD expressions
  9. 8Parameters, sets, groups
  10. 9Dashboards
  11. 10Best practices
  12. 11Interviews
The path. Each step has: what you'll learn, click-steps, a task to try, a hidden answer and a three-question check. A glossary and a ten-question mock quiz sit at the end.

About the pictures. There are no screenshots of Tableau on this page. The drawings of the workspace are illustrations, not screenshots: they show where things are, not exactly how they look. Tableau moves menus between versions, so the steps tell you what to look for, and each drawing links to the Tableau help page that covers it.

About the data. All the practice data is made up. Inkwell Books is not a real shop.

0 What Tableau is, and getting set up

You'll learn: what Tableau is for, when to reach for something else, and how to get the free version running.

Tableau is a tool for making charts and dashboards by dragging fields around. You point it at a table of data. You drag a column onto a shelf. Tableau draws a chart. Behind the scenes it writes the queries for you.

Analytics teams use it to build dashboards that other people open every week. Hiring teams use it in take-homes because a Tableau Public link shows your work in one click.

When to use Tableau, and when not to

ToolGood forLess good for
ExcelQuick sums, small tables, one-off checks, sharing a fileInteractive dashboards, data that refreshes, millions of rows
TableauExploring data by eye, dashboards with filters, sharing a linkHeavy data cleaning, statistics, anything you need to rerun as code
PythonCleaning, joining, modelling, repeatable analysisA dashboard a manager can click around in
Hex (or a notebook)SQL and Python side by side, with charts and a write-upA polished dashboard for non-technical readers

A common pattern in real teams: clean the data with SQL or Python, then build the dashboard in Tableau. For SQL, see SQL by example.

Get Tableau Public (free)

Tableau Public is Tableau's free platform. There are two ways in. Both need a free Tableau Public profile.

  1. Go to public.tableau.com and create a profile.
  2. Option A, in the browser. Tableau Public has free web authoring: you build vizzes in the browser with nothing to install. It needs a laptop or desktop. Phones and tablets are not supported for authoring.
  3. Option B, the desktop app. Download Tableau Desktop Public Edition from the Tableau Public site. It is free. It can save workbooks to your computer as well as to your public profile.
  4. Open it and look for the option to connect to a file. You are ready for step 1.

Read this before you publish anything

  • Anything you save to Tableau Public can be seen by anyone on the internet. Never upload private, work or customer data.
  • By default, other people can download your workbook and its data. You can turn downloads off in the viz settings.
  • Hiding a viz takes it off your profile page, but anyone with the link can still open it.
  • Tableau Public uses extracts only (a saved copy of the data, see the glossary), with a limit of 15 million rows per workbook.

Checked against Tableau's Tableau Public FAQ and Save workbooks to Tableau Public. Download pages and editions change, so check there for the current version.

Try it. Create your Tableau Public profile and open an empty workbook, in the browser or in the desktop app.

Checklist
  • You can sign in at public.tableau.com and see your (empty) profile.
  • You have a blank workbook open, with a way to connect to data.
  • You know that whatever you save there is public.

Check yourself

1. Who can see a workbook you save to your Tableau Public profile?

2. What do you need to build a viz with Tableau Public in the browser?

3. You need to clean and join three messy files and rerun it every month. Best first tool?

1 Connect to a CSV

You'll learn: how to load a CSV, check that Tableau read it properly, and what one row of the data means.

The practice data

Download bookshop_orders.csv (140 KB). It is made up: two years of online orders at Inkwell Books, a shop that does not exist. The script that made it is make_data.py; it uses a fixed seed, so it makes the same file every time.

One row is one order line: one product in one order. An order with three different books has three rows. Say the grain out loud before you build anything; it saves you from double counting later.

ColumnWhat it holds
line_idRow number, 1 to 1,207
order_idThe order. 720 orders, some with more than one line
order_date, ship_dateDates, January 2024 to December 2025
customer_id, segment260 customers; Consumer, Student or Business
country, cityTen European countries
category, productFive categories, nineteen products
units, unit_price, discountHow many, list price in euro, discount (0, 0.1 or 0.2)
sales, profitEuro, after discount
review_score1 to 5, blank on 543 rows (no review left)
returnedYes or No

Want more? The made-up offers.csv and companies.csv from the SQL and Python practice page also work in Tableau. They join on company_id.

Steps

  1. Start a new workbook and connect to a file. In the desktop app, CSV files come under the text file option. In the browser, look for the option to upload a file.
  2. Pick bookshop_orders.csv. Tableau opens the Data Source page: a preview grid of your rows.
  3. Look at the small icon above each column. It shows the data type: Abc for text, # for numbers, a calendar for dates. Check that order_date and ship_date are dates and sales is a number. If one is wrong, click the icon and change it.
  4. Click the Sheet 1 tab at the bottom. You are now in the workspace.
ToolbarShow MeData paneDimensionsAbccategoryAbccountryAbcproductAbcsegmentdateorder_dateMeasures#discount#profit#sales#units= marks acalculated fieldPagesFilterssegmentMarksAutomatic ▾ColorSizeLabelDetailTooltipShapecard: how markslookColumnsSUM(sales)RowscategoryView (the canvas)Data SourceSheet 1+ sheet+ dashboardsheet tabsToolbarShow MeColumnsSUM(sales)RowscategoryData paneDimensionsAbccategoryAbccountryAbcproductAbcsegmentdateorder_dateMeasures#discount#profit#sales#unitsPagesFilterssegmentMarksColorSizeLabelDetailTooltipShapehow marks lookView (the canvas)Data SourceSheet 1+ sheet+ dashboard
Illustration, not a screenshot. The main parts of a worksheet. Tableau's own guide: The Tableau Workspace and Shelves and Cards.

Try it. Connect the CSV. Drag sales onto Columns. What total does the single bar show when you hover over it?

Show the answer

€34,277.31, shown as SUM(sales). If you see a different number, check that Tableau read sales as a number and that the file has 1,207 rows. Profit should total €13,460.02.

Check yourself

1. In bookshop_orders.csv, one row is:

2. Where do you check that Tableau read order_date as a date?

3. What does the Marks card control?

2 Dimensions and measures, blue and green

You'll learn: the two pairs of ideas that explain almost everything Tableau does when you drop a field.

Dimensions are things you group by: names, categories, dates, places. category, country and order_date are dimensions.

Measures are numbers you add up or average. sales and profit are measures. When you drop a measure on a shelf, Tableau aggregates it, so you see SUM(sales), not 1,207 separate numbers.

The second pair is about how a field is drawn.

Blue = discrete. Makes headers.categoryone header per value:Children'sComicsFictionNon-fictionGreen = continuous. Makes an axis.SUM(sales)one axis, a range of values:€0k€3k€6k€9k€12kThe two ideas cross over:Discrete (blue)Continuous (green)Dimensioncategory, countrythe usual caseorder_date as acontinuous monthMeasuresales as discrete:a header eachSUM(sales):the usual case
Illustration, not a screenshot. Blue pills make headers, green pills make axes. Usually dimensions are blue and measures are green, but either can be switched. Tableau's guide: Dimensions and Measures, Blue and Green.

Dates are the place this matters most. A date's menu on a shelf has two sets of options. The first set gives date parts, which are discrete: "May" means every May, in any year. The second set gives date values, which are continuous: May 2024 and May 2025 are different points on a time axis. By default dates come in as discrete.

Rule of thumb. If a chart looks wrong, look at the pill colours first. A blue date where you wanted a line over time, or a measure that has become a dimension, explains most beginner surprises.

Try it. For each field, say whether it is a dimension or a measure, and how you would aggregate it: discount, review_score, unit_price, customer_id.

Show the answer
  • discount: a measure, but average it. A sum of discount rates means nothing.
  • review_score: a measure; average. Note the blanks (step 5).
  • unit_price: a measure; average, or use it inside a calculation. Summing prices across rows is meaningless.
  • customer_id: a dimension. To count customers use COUNTD([customer_id]): count distinct. Answer: 260.

Check yourself

1. A green pill on Columns creates:

2. You drop sales on a shelf and see SUM(sales). Why?

3. To count customers, use:

3 Your first charts

You'll learn: a sorted bar chart, a line over time, a scatter plot and a map. Each comes with the chart you should end up with, drawn from the same data, so you can check yours.

Bar chart: sales by category

  1. Drag category to Rows. You get a blue pill and five headers.
  2. Drag sales to Columns. You get a green SUM(sales) pill and horizontal bars.
  3. Sort: hover over the sales axis and click the small sort icon, or use the sort buttons in the toolbar. One click sorts descending.
  4. Drag sales onto Label on the Marks card to print the values on the bars.
You should see five bars, Non-fiction longest at €12,663 and Children's shortest at €3,209.
SUM(sales) by category, sortedNon-fiction€12,663Fiction€10,234Comics€4,237Stationery€3,933Children's€3,209
What your chart should show, drawn from bookshop_orders.csv (made-up data). Sorting guide: Sort data in a visualisation.

Line chart: sales by month

  1. Start a new sheet (the new-sheet tab at the bottom).
  2. Drag order_date to Columns. It arrives as a blue YEAR(order_date).
  3. Open the pill's menu (right-click, or the small arrow). In the second set of date options, pick Month. The pill turns green: a continuous month.
  4. Drag sales to Rows. Tableau draws a line.
You should see 24 points from January 2024 to December 2025, with a big jump each December. The top is December 2025, €3,526.
€0k€1k€2k€3k€4kJan 24Jul 24Jan 25Jul 25Dec 25: €3,526
Expected result, from the same made-up data. If you picked Month from the first set instead, you get 12 points (January to December) with both years added together. Tableau's guide: Change date levels.

Scatter plot: which products make money

  1. New sheet. Drag sales to Columns and profit to Rows. You get one dot: the grand total.
  2. Drag product onto Detail on the Marks card. Now there is one dot per product: 19 dots.
  3. Drag category onto Color.
Most products sit on a rising band: more sales, more profit. One sits far below the rest: Iron Hare, €1,540 of sales but only €68 profit.
€0€500€1,000€1,500€2,000€0€1,000€2,000€3,000€4,000SUM(sales)SUM(profit)Plain NumbersIron Hare
Expected result, from the same made-up data (colours by category left out here so the outlier stands out). Detail adds a level to the view without drawing anything new. Tableau's guide: Shelves and Cards.

Map: sales by country

  1. New sheet. In the Data pane, click the type icon next to country, choose Geographic Role, then Country/Region.
  2. Tableau adds Latitude (generated) and Longitude (generated) to the Data pane. Double-click each. You get a map.
  3. Drag country onto Detail: one circle per country.
  4. Drag sales onto Size.
Ten circles across Europe. The two biggest are Ireland (€11,616) and the United Kingdom (€9,734). Hover to check against the bars below.
SUM(sales) by countryIreland€11,616United Kingdom€9,734Spain€3,579France€2,352Netherlands€1,811Germany€1,745Italy€1,302Belgium€1,167Portugal€821Denmark€152
The numbers your map tooltips should show, drawn as bars because a bar is easier to check. Made-up data. Tableau's guide: Assign geographic roles.
Show Me. You can also select fields in the Data pane and click Show Me. It highlights chart types that fit those fields, and hovering a chart type tells you what it needs. It is handy for learning; you will build faster by dragging. Guide: Use Show Me.

Try it. Build a bar chart of profit by product, sorted. Which product is last, and which category is it in?

Show the answer

Iron Hare (Comics), €67.66 profit. Second-last is Moon for Muffin (Children's), €195.28. Plain Numbers is top at €1,676.56. The scatter plot told you the same thing at a glance.

Check yourself

1. Your monthly line shows 12 points, with both years added together. What happened?

2. In the scatter, which step turned one dot into 19?

3. Which product sells well but makes almost no profit?

4 Sorting, filtering and the order of operations

You'll learn: the kinds of filter, and the order Tableau runs them in. This order explains many "why is my number wrong?" moments, and interviewers love it.

Filter steps

  1. Drag segment onto the Filters shelf. Tick the values to keep. That is a dimension filter.
  2. To let readers change it, open the filter pill's menu and look for Show Filter. A filter control appears beside the chart.
  3. Drag sales onto Filters and pick an aggregation such as Sum. Set "at least 2,000". That is a measure filter: it keeps marks whose total passes the test.
  4. For a Top N filter, drag product onto Filters and use the Top tab: top 5 by sales.
1Extract filtersWhat goes into the extract at all2Data source filtersEvery sheet using the source3Context filtersGrey pills. Run before the rest4FIXED LOD expressionsDimension filters do not touch them5Dimension filtersNormal filters on fields; Top N too6INCLUDE / EXCLUDE LODsRun after dimension filters7Measure filterse.g. SUM(sales) at least €2,0008Table calculationsRun on the marks left in the view9Table calc filtersHide marks, calc unchanged
Simplified from Tableau's Order of Operations and LOD overview. Tableau's full chart has more steps (sets, totals, forecasts); these are the ones you will meet first.

The classic trap: Top N plus another filter

Filter to country = Ireland and add a Top 5 products filter. Both are dimension filters, so they run at the same step. Top 5 is worked out across all countries, then the Ireland filter is applied. You get the five best sellers overall, showing their Irish sales. Quiet Hours is in your chart, but it is only sixth in Ireland.

Fix: right-click the country filter, Add to Context. Now Ireland is applied first, and Top 5 is worked out inside Ireland.

Try it. Build the top 5 products in Ireland, first without a context filter, then with one. Which product changes?

Show the answer
Without contextWith Ireland in context
Plain Numbers €1,377Plain Numbers €1,377
How Rivers Bend €1,171How Rivers Bend €1,171
Small Data €1,035Small Data €1,035
Harbour Lights €867Paper Moons €903
Quiet Hours €818Harbour Lights €867

Paper Moons replaces Quiet Hours. Paper Moons is only eighth overall, so the overall Top 5 never picks it up. Guide: Use context filters.

Check yourself

1. Which runs first?

2. Top 5 products plus a country = Ireland filter gives the overall top 5. The fix:

3. A filter that should apply to every sheet using the data is best as a:

5 Calculated fields

You'll learn: how to make new fields from formulas: ratios, IF and CASE, date maths, and handling blanks.

Create one with Analysis > Create Calculated Field. Give it a name, type the formula, click OK. The new field appears in the Data pane with an = sign on its icon. Field names go in square brackets: [sales].

Ratios: aggregate first, then divide

// Profit ratio. Aggregate, then divide.
SUM([profit]) / SUM([sales])

Overall this gives 39.3%. The tempting version, [profit] / [sales], divides on every row first. Averaged, it gives 38.5%: every small order counts as much as a big one. For a ratio of totals, aggregate first.

IF and CASE

// Line size band
IF [sales] >= 50 THEN "50+"
ELSEIF [sales] >= 20 THEN "20-49"
ELSE "Under 20"
END

IF checks tests in order and returns the first one that is true. Without ELSE, rows that match nothing get null. Here: 662 lines under €20, 397 from €20 to €49, 148 at €50 or more.

// Market
CASE [country]
WHEN "Ireland" THEN "Home"
WHEN "United Kingdom" THEN "UK"
ELSE "Rest of Europe"
END

CASE compares one field with a list of values. It is tidier than IF when every test is "equals". IIF(test, then, else) is the one-line version of IF.

Dates: DATETRUNC and DATEDIFF

// First day of the order's month
DATETRUNC('month', [order_date])

// Days from order to shipping
DATEDIFF('day', [order_date], [ship_date])

DATETRUNC rounds a date down to the start of the year, quarter, month, week or day. DATEDIFF counts the date parts between two dates. Average days to ship: Business 2.0, Consumer 3.5, Student 3.5.

Blanks: ZN, IFNULL, ISNULL

ZN([review_score])          // null becomes 0
IFNULL([city], "Unknown")   // null becomes the second value
ISNULL([review_score])      // TRUE when blank

Careful. AVG([review_score]) skips the 543 blanks and gives 3.81. AVG(ZN([review_score])) counts every blank as a zero score and gives 2.10. No review is not a score of zero. Use ZN when null really does mean zero, such as "no sales this month".

Counting. COUNT([order_id]) counts rows: 1,207. COUNTD([order_id]) counts distinct orders: 720. Average order value is SUM([sales]) / COUNTD([order_id]) = €47.61.
Comments. Start a line with // to leave a note in a formula. Tableau ignores it when it calculates. Future you will thank you.

Formulas checked against Tableau's logical functions, date functions and Get started with calculations.

Try it. Make the Market CASE field above. What share of sales does each market make?

Show the answer

Home (Ireland) €11,616, 33.9%. UK €9,734, 28.4%. Rest of Europe €12,928, 37.7%. To see percentages, put Market on Rows, sales on Columns, then use a percent-of-total quick table calculation (next step).

Check yourself

1. The right profit ratio for a group of rows:

2. AVG(ZN([review_score])) gives a lower score than AVG([review_score]) because:

3. DATEDIFF('day', [order_date], [ship_date]) returns:

6 Table calculations

You'll learn: running totals, percent of total, rank and difference from the previous value, and why these behave differently from calculated fields.
Calculated fieldWorked out from the data source:row by row, or as an aggregate.Lives in the Data pane.Same answer on every sheet.Table calculationWorked out from the marksalready in the view.Shows a delta (Δ) on its pill.Changes if you filter or move fields.
Tableau's guide: Transform values with table calculations.

Steps: a quick table calculation

  1. Build monthly sales for 2025: continuous Month of order_date on Columns, sales on Rows, and a filter on Year = 2025.
  2. Right-click the SUM(sales) pill and choose Quick Table Calculation, then Running Total.
  3. A delta symbol (Δ) appears on the pill. That tells you a table calculation is on.
  4. Try the others: Difference, Percent of Total, Rank. There are also percent difference, percentile, moving average, YTD total, compound growth rate, year over year growth and YTD growth.
Running total ends at €18,167 in December 2025. December is rank 1, June rank 2.
2025SalesRunning totalDifferenceRank
Jan€973€973blank12
Feb€1,194€2,167+2218
Mar€1,184€3,351−109
Apr€1,033€4,385−15111
May€1,084€5,468+5010
Jun€2,029€7,497+9452
Jul€1,268€8,765−7606
Aug€1,488€10,253+2205
Sep€1,201€11,454−2877
Oct€1,512€12,966+3114
Nov€1,675€14,641+1633
Dec€3,526€18,167+1,8511

Expected values from the made-up data. The January difference uses December 2024 only if 2024 is in the view; with the 2025 filter on, January has no previous month and shows blank. That is the "computes on the view" idea in action.

The functions behind them

RUNNING_SUM(SUM([sales]))              // running total
SUM([sales]) / TOTAL(SUM([sales]))     // percent of total
RANK(SUM([sales]))                     // rank, highest = 1
SUM([sales]) - LOOKUP(SUM([sales]), -1) // change from previous

Compute Using: across what?

A table calculation needs a direction. Addressing fields are the ones it moves along. Partitioning fields split the view into separate pieces, and the calculation restarts in each. With Compute Using (on the pill's menu), Tableau picks for you. With Specific Dimensions, you choose.

Example: put Year and Month in the view with a running total. Compute along Month with Year as the partition, and the total restarts each January. Compute along both, and it runs from January 2024 to December 2025.

Why your percent of total changed

Table calculations only see the marks left after filters. Filter out three categories and "percent of total" now means percent of the two that are left. If you need a share that ignores the filter, use a FIXED LOD (step 7).

Try it. Show each category's percent of total sales. Then add a filter that removes Comics. What happens to Non-fiction's share?

Show the answer

Before: Non-fiction 36.9%, Fiction 29.9%, Comics 12.4%, Stationery 11.5%, Children's 9.4%. After removing Comics, the four left add to 100% again, and Non-fiction becomes 42.2% (€12,663 of €30,040). Same sales, different denominator.

Check yourself

1. A delta (Δ) on a pill means:

2. You filter out Comics and every percent of total changes. Why?

3. Partitioning fields:

7 LOD expressions: FIXED, INCLUDE, EXCLUDE

You'll learn: how to calculate at a level different from the chart, with three worked examples of each type and a diagram for choosing.

Every view has a level of detail: the dimensions in it. A chart by category works at category level. A level of detail (LOD) expression lets one calculation work at another level. The shape is always:

{ FIXED | INCLUDE | EXCLUDE  [dimension] : AGGREGATE([measure]) }
Is the number you want at thesame level as the view?YesPlain aggregate:SUM, AVG, COUNTDNoShould the view'sfilters and dimensionsleave it alone?YesFIXEDown levelNoFiner or coarserthan the view?FinerINCLUDEadd a dimensionCoarserEXCLUDEdrop a dimensionOnly need it across the marks you see(running total, rank, % of what's shown)?Use a table calculation instead.
Which do I need? A rule of thumb drawn from Tableau's LOD overview.

FIXED, three examples

1. Each customer's first order date.

{FIXED [customer_id] : MIN([order_date])}

Every row now carries its customer's first order date. Put YEAR of it on Rows and COUNTD([customer_id]) on Columns: 178 customers first bought in 2024 and 82 in 2025. This is how you build cohorts.

2. Customer lifetime sales.

{FIXED [customer_id] : SUM([sales])}

Use it as a dimension: make bins of it, or filter it. 39 customers have spent €200 or more. The top customer spent €1,953.

3. A share of total that ignores filters.

SUM([sales]) / ATTR({FIXED : SUM([sales])})

With no dimension, FIXED returns the grand total, €34,277. Ireland is 33.9%. Filter the view to Ireland and it stays 33.9%, because the dimension filter does not reach the FIXED total. A percent-of-total table calc would jump to 100%.

INCLUDE, three examples

1. Average sales per customer, by segment.

{INCLUDE [customer_id] : SUM([sales])}

Put segment on Rows and this field on Columns, set to AVG. Tableau sums per customer, then averages those totals within each segment. Business €354.78, Consumer €97.86, Student €83.79. A plain AVG([sales]) would average order lines instead.

2. Average order value by country.

{INCLUDE [order_id] : SUM([sales])}

Set to AVG, with country in the view. Italy €68.51 (19 orders), Ireland €49.85 (233 orders), France €33.60. Check the counts before you praise Italy.

3. Average orders per customer, by segment.

{INCLUDE [customer_id] : COUNTD([order_id])}

Set to AVG. Business 2.97, Consumer 2.78, Student 2.62.

EXCLUDE, three examples

1. Each category's share of its year. View: YEAR(order_date) and category.

SUM([sales]) / SUM({EXCLUDE [category] : SUM([sales])})

The EXCLUDE part drops category, so it gives the year's total. Non-fiction fell from 42.0% of 2024 sales to 32.5% of 2025 sales. Fiction rose from 27.6% to 31.9%.

2. Each segment's share of its country. View: country and segment.

SUM([sales]) / SUM({EXCLUDE [segment] : SUM([sales])})

Business makes 37.0% of Irish sales but 68.5% of Spanish sales. A handful of business buyers carry Spain.

3. Each product's share of its category. View: category and product.

SUM([sales]) / SUM({EXCLUDE [product] : SUM([sales])})

Iron Hare is 36.3% of Comics sales: the biggest comic by sales and the worst for profit. Book Light is 46.1% of Stationery.

Why SUM around the EXCLUDE? An EXCLUDE result repeats the same total on every mark it covers. In a ratio you need an aggregate, and wrapping it in SUM, MIN or MAX gives that same total per mark here. Check one number by hand the first time you build any LOD.

Syntax checked against Tableau's pages on INCLUDE and EXCLUDE.

Try it. Using the first-order-date FIXED field, what share of 2025 sales came from customers who first bought in 2024?

Show the answer

65.5%: €11,891 of €18,167. Steps: make the FIXED field, then a field YEAR([First order]) = 2024 (TRUE or FALSE). Filter Year of order_date to 2025, put the TRUE/FALSE field on Rows, sales on Columns, and add percent of total. Returning customers are two thirds of the year.

Check yourself

1. Which LOD ignores dimension filters unless they are in context?

2. Average sales per customer, shown by segment:

3. View: year and category. You want each year's total beside every category. Use:

8 Parameters, sets and groups

You'll learn: three ways to let you (or your reader) reshape a view without rebuilding it.

Parameters: a value the reader can change

A parameter is a single value: a number, date or piece of text. On its own it does nothing. It only works once a calculation, filter or reference line uses it.

  1. In the Data pane menu, create a parameter. Name it Top N, data type integer, allowable values Range from 3 to 10, step 1.
  2. Right-click it and choose Show Parameter. A slider appears.
  3. On your Top 5 product filter, change "5" to use the Top N parameter.
// Metric switch: a string parameter with the list "Sales", "Profit"
CASE [Choose metric]
WHEN "Sales" THEN SUM([sales])
WHEN "Profit" THEN SUM([profit])
END

Put this field on Columns and one chart can show either measure. Allowable values can be All (type anything), a List, or a Range (numbers and dates only).

Sets: in or out

A set splits a dimension's members into In and Out. A dynamic set uses a rule and updates when the data changes: "top 20 customers by sales". A fixed set is a list you picked by hand.

  1. Right-click customer_id and create a set. On the Top tab: top 20 by sum of sales.
  2. Drag the set onto Rows with sales on Columns: two bars, In and Out.
The top 20 customers (each spent €355 or more) make 35.9% of all sales.

You can show a set control so readers change the members, but only for dynamic sets. Set actions let readers change a set by clicking marks on a dashboard.

Groups: merge values

A group combines members of a field into one. Right-click country, create a group, select Ireland and United Kingdom, click Group. Tick Include 'Other' to put everything else together. Ireland and UK: 62.3% of sales. Groups are also the quick fix for messy spellings, such as "UK" and "United Kingdom" in the same column.

Checked against Tableau's Create parameters, Create sets and Group your data.

Try it. Build the metric switch. Switch it to Profit on your category bar chart. Which category moves the most?

Show the answer

Comics moves most: third on sales (€4,237), last on profit (€896). Stationery climbs from fourth on sales to third on profit (€2,171). Remember to sort by the switch field, not by sales, or the bars will not reorder.

Check yourself

1. A parameter on its own:

2. Which set can show a set control for readers?

3. 'UK' and 'United Kingdom' appear as two countries. Quick fix:

9 Building a dashboard

You'll learn: how to put sheets together, wire up filters and actions, make a phone layout and publish a link.

This step is the Tableau mechanics. For what should go on a dashboard (who it is for, which five numbers, how to name metrics), read How to build dashboards first.

Desktop (fixed size)Sales grew 13% in 2025, andDecember gave most of that growthSales€34.3kOrders720Profit39%Filter:Year ▾Monthly sales (line)By category (bar)Most important view: top left.Phone layoutSales grew 13%,mostly in DecSales €34.3kstacked, one columnDesktop (fixed size)Sales grew 13% in 2025, andDecember gave most of that growthSales€34.3kOrders720Profit39%Filter:Year ▾Monthly sales (line)By category (bar)Phone layout: the same, stackedSales grew 13%,mostly in DecemberSales €34.3kone column
Illustration, not a screenshot. A simple layout and its phone version. Tableau's guides: Best practices for effective dashboards and Create dashboard layouts for different device types.

Steps

  1. Make each chart its own sheet first. Name every sheet tab (double-click it). "Sales by month" beats "Sheet 4".
  2. New dashboard: use the new-dashboard tab at the bottom.
  3. Size. The default is a fixed size. Build at the size people will view it. Automatic resizes to the screen and can squash charts; a range is a middle way.
  4. Drag sheets from the left-hand list onto the canvas. Put the most important view top left. Keep it to two or three views; make a second dashboard if you need more.
  5. Filters. Show the filter you need, then look in its menu for the option to apply it to other worksheets, so one Year filter drives every chart.
  6. Actions. In the Dashboard menu, open Actions. A filter action lets a click on one chart filter the others. A highlight action dims everything else. Others: go to URL, go to sheet, change parameter, change set values.
  7. Title states the finding. "Sales grew 13% in 2025, mostly in December" tells the reader what to see. "Sales dashboard" does not.
  8. Phone layout. Click Device Preview, pick Phone, and add the layout. Phone layouts can be generated automatically; keep the lock open and it follows your main layout. Fit width is the size to use for phones.
  9. Publish. In the desktop app: Server > Tableau Public > Save to Tableau Public, sign in, give it a clear title, Save. In the browser, save it to your profile. Before you publish, untick Show sheets as tabs so device layouts are picked correctly.
  10. Share the link. Open your viz on your profile and copy the address. Open it in a private browser window and on your phone to check what others see.

Which layout shows up? Tableau uses the smaller side of the browser area: 500 pixels or less gets the phone layout, 501 to 800 tablet, above 800 desktop.

Checked against Actions, device layouts and Save to Tableau Public.

Try it. Build a one-page dashboard from your monthly line and your category bars. Add a Year filter that drives both, a filter action from the bars, a title that states a finding, and a phone layout. Publish it.

Checklist
  • The title is a sentence with a number in it.
  • Clicking Fiction in the bar chart filters the line to Fiction.
  • The Year filter changes both charts.
  • Sheet titles are plain words; no "SUM(sales)" visible.
  • Device Preview on Phone shows one column you can read without zooming.
  • The link opens in a private window, and you have decided whether downloads are on.

Check yourself

1. Where should the most important view go?

2. A click on one chart should filter another. You need a:

3. Which layout does a 390-pixel-wide phone get?

10 Best practices

You'll learn: the habits that make a Tableau workbook clear, fast and easy for someone else to pick up. Each pair shows a chart to avoid and a better one, drawn from the made-up bookshop data.

Where Tableau's own help pages give advice, the link is beside it. The chart rules also follow How I judge a chart.

1. The title is the finding

AvoidSales by CategoryNon-fiction€12.7kFiction€10.2kComics€4.2kStationery€3.9kChildren's€3.2k
BetterNon-fiction is 37% of salesSales by category, 2024-25 (made up)Non-fiction€12.7kFiction€10.2kComics€4.2kStationery€3.9kChildren's€3.2k

One point per view. If you cannot write the title as a sentence, the chart has not decided what it is for.

2. Colour sparingly

AvoidProfit ratio by categoryStationeryNon-fictionFictionChildren'sComics
BetterComics keeps least of each €Stationery55%Non-fiction44%Fiction37%Children's34%Comics21%

Tableau's advice: too many colours overload the reader; use neutral colours with one bright colour for what matters. (Visual best practices)

3. Sort the bars, start at zero

AvoidSales by categoryChildren'sComicsFictionNon-fictionStationeryaxis starts at €3,000
BetterSales by categoryNon-fiction€12.7kFiction€10.2kComics€4.2kStationery€3.9kChildren's€3.2ksorted, axis starts at 0

A bar's length is the message. Cut the axis and a bar three times smaller looks thirty times smaller.

4. Label directly

AvoidSales by segmentQ1Q2Q3Q4BusinessConsumerStudentLegend
BetterBusiness is catching upConsumerBusinessStudentQ1Q2Q3Q4

Put names at the end of lines or on bars and drop the legend where you can. Readers should not have to match colours.

5. No pie overload, no 3D

AvoidSales by country
BetterIreland and the UK: 62%Ireland€11.6kUK€9.7kSpain€3.6kFrance€2.4kNetherl.€1.8kGermany€1.7kItaly€1.3k+3 more

Ten slices cannot be compared by eye. A sorted bar can. Pies are fine for two or three parts at most; 3D effects only distort.

6. Avoid dual axes

AvoidSales and profit ratio0k5k10k0%25%50%two scales, crossing lines mean nothing
BetterStationery: small sales, best marginSalesStationeryProfit ratioStationery

Two scales on one chart invite readers to compare things that do not share units. Two small charts, lined up, say the same thing honestly.

7. Tooltips and number formats

AvoidDefault tooltipcategory: Non-fictionSUM(sales): 12663.3391AGG(ratio): 0.43977Field names, raw decimals,nothing to compare with.
BetterEdited tooltipNon-fiction€12.7k sales, 37% of the totalKeeps 44% as profitPlain words, one number format,and the context to judge it.

Tableau suggests rewriting tooltips to reinforce the story, as a short sentence with the key part bold. (Visual best practices) Set number formats once on the field, so euro and percentages look the same on every sheet.

8. Dashboard layout

AvoidOverview Dashboard8 views, 5 filters, no point
BetterDecember drives the yearSales€34.3kDec share17%Year ▾Dec

Most important view top left. Two or three views per dashboard, four at most. Build at a fixed size, and add a phone layout. (Dashboard best practices)

Tidy workbooks

Speed

Accessibility

Check the data before you publish

The one-screen checklist

  1. Title states the finding
  2. One point per view
  3. Grey, plus one highlight colour
  4. Bars sorted, axis from zero
  5. Direct labels, few legends
  6. No pies over three slices, no 3D
  7. No dual axes
  8. One number format per measure
  9. Tooltips written as sentences
  10. Most important view top left
  11. Two to four views per dashboard
  12. Fixed size, plus a phone layout
  13. Fields, sheets and calcs named
  14. Calculations commented
  15. Fields in folders, unused hidden
  16. Extract, filtered early
  17. Performance Recorder if slow
  18. Colour-blind safe, good contrast
  19. Alt text and captions
  20. Totals checked against the source

Try it. Take the dashboard you built in step 9 and score it against the checklist. Fix the three worst.

What people usually find
  • A title that names fields ("Sales by Category") instead of a finding.
  • Tableau's default colours on a chart where only one bar matters.
  • Default tooltips showing SUM(sales) and long decimals.
  • "Sheet 2" or "Calculation1" left in the workbook.

Check yourself

1. Best title for a chart of sales by category:

2. A dashboard is slow. First step:

3. How many views on one dashboard is a good default?

11 Tableau in interviews and take-homes

You'll learn: what you are likely to be asked, a practice brief to time yourself on, and what reviewers look for.

Typical asks

Practice brief (60 to 90 minutes)

Inkwell Books (made up). The owner sends you bookshop_orders.csv: "We grew in 2025, but I don't know where the growth came from or whether it will last. Build me one dashboard I can open on my phone, and tell me where to focus next year." Deliver a Tableau Public link and a short note of three to five sentences.

Model answer outline
  1. 10 min: check the data. 1,207 lines, 720 orders, 260 customers, 2024 to 2025. Sales €34,277. 543 blank reviews. Grain: one row per order line.
  2. 20 min: find the story. Sales up 13% (€16,110 to €18,167). December 2025 alone added €1,246 over December 2024, about 61% of the growth. Non-fiction fell from 42% to 33% of sales; Fiction, Comics and Children's grew. 65.5% of 2025 sales came from customers first seen in 2024. Iron Hare sells well but barely profits.
  3. 30 min: build. Three numbers (sales, growth, returning-customer share), a monthly line with December marked, category bars coloured by change. A Year filter and a filter action. Phone layout.
  4. 10 min: title and note. Title: "2025 grew 13%, mostly in December, mostly from returning customers." Note: what you found, one action (protect the December peak; review Iron Hare's discounts), and one caveat (two years of data; blank reviews).
  5. 10 min: check. Recompute one number another way. Open the link in a private window and on a phone.

What reviewers look for

Common mistakes

  • Ten charts and no answer.
  • Summing a ratio or averaging an average.
  • Counting rows when the question was about orders or customers.
  • A Top N with another filter, and no context filter.
  • Percent of total that changes when a filter moves, without meaning to.
  • Uploading the company's real data to Tableau Public. Use the file they sent, and check it is meant to be public.
  • Never opening the published link before sending it.

For how a full take-home answer is laid out, see the take-home walkthrough. For written tests in data roles, see data tech exams.

Check yourself

1. A take-home asks for a Tableau Public link. Before you send it:

2. What do reviewers value most?

3. Your company's real customer data for a public portfolio piece:

Glossary

Workbook
A Tableau file holding sheets, dashboards and stories.
Worksheet
One sheet with one view (chart) on it.
Dashboard
A sheet that arranges several worksheets, filters and text together.
Story
A sequence of sheets or dashboards that walk through a point.
Data source
The connection to your data, plus any joins, relationships and field changes.
Data Source page
The tab where you connect, preview rows and fix data types.
Extract
A saved copy of the data (a .hyper file). Fast; can be refreshed. Tableau Public uses only extracts.
Live connection
Queries the source directly each time. Not available on Tableau Public.
Data pane
The list of fields on the left of a worksheet.
Analytics pane
Beside the Data pane: reference lines, trend lines, totals.
Field
A column of your data, as Tableau shows it.
Dimension
A field you group by: text, dates, places.
Measure
A numeric field that Tableau aggregates.
Discrete
Separate values. Blue pill. Makes headers.
Continuous
An unbroken range. Green pill. Makes an axis.
Pill
A field placed on a shelf or card.
Shelf
A drop zone: Columns, Rows, Filters, Pages.
Marks card
Sets the mark type and Color, Size, Label, Detail, Tooltip, Shape.
Mark
One drawn thing: a bar, a dot, a point on a line.
Detail
Marks card slot that adds a dimension to the view without drawing it.
Header
The labels a discrete field makes on Rows or Columns.
Axis
The scale a continuous field makes on Rows or Columns.
Show Me
Toolbar panel that suggests chart types for the selected fields.
Aggregation
How a measure is summed up: SUM, AVG, MIN, MAX, COUNT, COUNTD.
Level of detail
The dimensions in a view. Decides how many marks there are.
Context filter
A filter that runs before other worksheet filters. Grey on the shelf.
Data source filter
Applies to every sheet that uses the data source.
Extract filter
Limits which rows go into the extract.
Top N filter
Keeps the top or bottom N members by a measure.
Measure filter
Keeps marks whose aggregated value passes a test.
Calculated field
A new field made with a formula. Has = on its icon.
Table calculation
A calculation on the marks in the view: running total, rank, percent of total.
Addressing
The fields a table calculation moves along.
Partitioning
The fields that split a table calculation into separate pieces.
LOD expression
A calculation at a level of detail you set: FIXED, INCLUDE or EXCLUDE.
FIXED
Calculates at the named dimensions only. Ignores dimension filters.
INCLUDE
Calculates at the view's level plus named dimensions.
EXCLUDE
Calculates at the view's level minus named dimensions.
Parameter
A single value the reader can change, used by calcs, filters and reference lines.
Set
Splits a dimension's members into In and Out. Dynamic or fixed.
Group
Combines several members of a field into one.
Geographic role
Tells Tableau a field is a place, so it can be mapped.
Dashboard action
Interactivity: filter, highlight, URL, go to sheet, change parameter, change set.
Device layout
A separate dashboard layout for phone, tablet or desktop.
Tableau Public
Tableau's free platform. Everything saved there is public.
Desktop Public Edition
The free desktop app for Tableau Public. Can also save locally.
Performance Recorder
Records what takes time in a workbook, so you can fix it.

Mock quiz: ten questions

Mixed questions from every step. Your score updates as you go.

1. Blue pills are:

2. Which runs first?

3. COUNT([order_id]) is 1,207 and COUNTD([order_id]) is 720. How many orders?

4. Running total, rank and percent of total are:

5. {FIXED [customer_id] : MIN([order_date])} gives:

6. You want a share of total that stays put when the reader filters by country. Use:

7. Which LOD responds to dimension filters without a context filter?

8. Ten countries as slices of one pie. Better:

9. IF without an ELSE returns what for rows that match no test?

10. Who can download your Tableau Public workbook by default?

Score: 0 of 10 answered

Where next