From data to decision in 60 minutes
Which product loses money?
Today you answer this in 2 minutes.
Workbook = Worksheets 📊 + Dashboards 🧩 + Stories 📖
Tableau Public = free · Tableau Desktop = paid, saves locally
Today: Sample - Superstore → drag Orders to the canvas
Wrong icon? Click it → change type — before any chart.
Words · groups
Splits the data → headers
Numbers
Adds up → an axis
Tip
Most charts = 1 blue on one shelf + 1 green on the other.
Discount: East 10%, West 20%
Total = 10% + 20% = 30%
Average = 15% ✓
Rates & % → right-click pill → Measure → Average
Marks dropdown → Bar · Line · Pie
Ctrl-click Category + Sales → Show Me
Only charts that fit your fields light up.
Drag Region → Filters → tick
Right-click → Show Filter = a control for users
Select marks → Keep Only ✓ or Exclude ✗
viewof dim = Inputs.radio(["Category", "Region"], {label: "Columns", value: "Category"})
viewof measure = Inputs.radio(["Sales", "Profit"], {label: "Rows", value: "Sales"})
viewof regions = Inputs.checkbox(["Central", "East", "South", "West"], {label: "Filter", value: ["Central", "East", "South", "West"]})
viewof sorted = Inputs.toggle({label: "Sort ↓", value: false})
viewof labels = Inputs.toggle({label: "Labels", value: true})data = [
{Region: "Central", Category: "Furniture", Sales: 163797, Profit: -2871},
{Region: "East", Category: "Furniture", Sales: 208291, Profit: 3046},
{Region: "South", Category: "Furniture", Sales: 117299, Profit: 6771},
{Region: "West", Category: "Furniture", Sales: 252613, Profit: 11505},
{Region: "Central", Category: "Office Supplies", Sales: 167026, Profit: 8880},
{Region: "East", Category: "Office Supplies", Sales: 205516, Profit: 41015},
{Region: "South", Category: "Office Supplies", Sales: 125651, Profit: 19987},
{Region: "West", Category: "Office Supplies", Sales: 220853, Profit: 52610},
{Region: "Central", Category: "Technology", Sales: 170416, Profit: 33697},
{Region: "East", Category: "Technology", Sales: 264974, Profit: 47462},
{Region: "South", Category: "Technology", Sales: 148772, Profit: 19992},
{Region: "West", Category: "Technology", Sales: 251992, Profit: 44304}
]
agg = d3.rollups(data.filter(d => regions.includes(d.Region)),
v => d3.sum(v, d => d[measure]), d => d[dim])
.map(([key, value]) => ({key, value}))
Plot.plot({
height: 400, width: 620, marginLeft: 60,
style: {background: "transparent", color: "#e8edf3", fontSize: "14px"},
x: {label: null, domain: sorted ? d3.sort(agg, d => -d.value).map(d => d.key) : undefined},
y: {label: `SUM(${measure})`, grid: true, tickFormat: "~s"},
color: {domain: ["Gain", "Loss"], range: ["#4e79a7", "#e15759"]},
marks: [
Plot.barY(agg, {x: "key", y: "value", fill: d => d.value < 0 ? "Loss" : "Gain", rx: 4}),
labels ? Plot.text(agg, {x: "key", y: "value", text: d => d3.format(",.0f")(d.value), dy: -10, fill: "#e8edf3"}) : null,
Plot.ruleY([0], {stroke: "#9fb0c3"})
]
})Analysis → Create Calculated Field → Profit Margin
❌ divides row by row → wrong total
Analysis → Create Calculated Field → Profit Margin
✅ add first, then divide
Format → Number Format → Percentage
New Dashboard tab → empty canvas
Drag sheets in → funnel icon Use as Filter 🔗
New Story = dashboards in order, like slides 📖
Which category should the manager worry about?
.twb or .twbx? .twbx 📦File → Save As → .twbx · File → Print to PDF · Worksheet → Export → Image
Who loses money? Furniture in Central 🔴
BIS 2103 · Tableau Basics