AGENT SKILL

tableau-best-practices

Builds Tableau dashboards that compute correct numbers at the right grain and stay fast - LOD expressions, filter-order pipeline, extract strategy, and mark-count control. Use when someone asks "why is my Tableau number different from SQL", "FIXED vs INCLUDE vs EXCLUDE", "my dashboard takes 30 seconds to load", "table calc or LOD", or is designing a workbook others will consume. Do NOT use for Power BI or DAX measures - use power-bi-dax instead; for narrative presentation of findings use data-story; for KPI selection and review cadence use kpi-scoreboard-and-cadence; for static table layout and formatting use data-table-design.

License 许可
MIT
所属仓库
SkillMedev/skills
最近更新
2026-10-14
Stars
★ 25
Forks
3

01 前言 Front Matter

name
tableau-best-practices
metadata
{ "title": "Tableau Best Practices" }
description
Builds Tableau dashboards that compute correct numbers at the right grain and stay fast - LOD expressions, filter-order pipeline, extract strategy, and mark-count control. Use when someone asks "why is my Tableau number different from SQL", "FIXED vs INCLUDE vs EXCLUDE", "my dashboard takes 30 seconds to load", "table calc or LOD", or is designing a workbook others will consume. Do NOT use for Power BI or DAX measures - use power-bi-dax instead; for narrative presentation of findings use data-story; for KPI selection and review cadence use kpi-scoreboard-and-cadence; for static table layout and formatting use data-table-design.

03 SKILL.md 正文

Tableau Best Practices

Tableau's two failure modes are wrong numbers and slow dashboards, and both come from the same blind spot: not knowing at what grain a number is computed and when each filter fires. A dashboard that shows a plausible-but-wrong average per customer costs more than one that errors, because nobody checks it.

Operating procedure

Step 1: gather inputs

Before building, establish:

  • The one question the dashboard answers, and the headline metric that answers it. If stakeholders list five questions, that is five dashboards or a scope fight - have it now.
  • The grain of the source data (one row = ?) and the grain of every metric requested. "Average sales" is undefined until someone says per-order, per-customer, or per-region; label any grain you inferred as a guess.
  • Data size and freshness need. Live connection only when data must be minutes-fresh and the source is fast; otherwise a Hyper extract, refreshed on schedule.
  • Target screen and device - fixed-size dashboards sized to the actual display render faster and break less than automatic sizing.

Step 2: pin the grain of every number

Tableau aggregates measures to the dimensions in the view. The same SUM([Sales]) is a different number on a region chart than on a customer chart. For every metric, write down the grain it should have; when it differs from the view grain, that is an LOD expression:

  • FIXED computes at a stated grain regardless of view dimensions and dimension filters (context filters still apply): { FIXED [Customer] : SUM([Sales]) }
  • INCLUDE adds dimensions to the view grain, then aggregates up.
  • EXCLUDE removes dimensions from the view grain.

The canonical case - average sales per customer, shown by region:

Bad:  AVG([Sales])
      // averages order lines, not customers; a customer with many
      // small orders drags the number down
Good: AVG({ FIXED [Customer] : SUM([Sales]) })
      // sums to customer grain first, then averages customers

Choose table calcs vs LODs by grain source: table calcs (RUNNING_SUM, RANK, WINDOW_AVG) operate on the rendered table after aggregation and depend on partitioning/addressing - use them for running totals, percent of total, rank. Use LODs when the grain must hold regardless of what is in the view.

Step 3: place filters in the pipeline deliberately

Tableau applies filters in a fixed order: Extract → Data Source → Context → Dimension → Measure → Table Calc. Two consequences drive everything:

  • FIXED LODs compute before dimension filters and after context filters. If a FIXED metric ignores a user's filter selection, either that is intended (state it in the tooltip) or the filter must be promoted to context.
  • A slow workbook that scans too much data usually needs its big categorical filter promoted to a context filter, so everything downstream operates on the reduced set.

Step 4: engineer for performance

Practitioner red lines - treat a dashboard over 5 seconds to load as broken:

  • Extracts over live connections for anything large or slow; aggregate the extract to the visible grain when row-level detail is never shown.
  • Keep marks per view in the low thousands; tens of thousands of marks is a scatterplot nobody can read and a render nobody will wait for. Aggregate before plotting.
  • Limit a dashboard to 4-5 worksheets; each sheet is at least one query.
  • Avoid blending when a join or relationship will do - blends compute client-side and choke on high-cardinality link fields.
  • Avoid quick filters with hundreds of values ("Only relevant values" fires an extra query per filter); prefer a wildcard or parameter-driven filter.
  • Hide unused fields; run Performance Recorder and read which query or render step actually dominates before optimizing anything.

Step 5: design the view

  • One clear question per dashboard; headline metric top-left, since that is where eyes land first.
  • Chart choice is a decision, not a taste: time trend → line; category comparison → sorted bar; contribution to whole at one point in time → stacked bar or treemap, never pie beyond ~4 slices; relationship between two measures → scatter; single KPI vs target → big number with delta. A worked example: "revenue by month by segment" is a line chart with one line per segment - not a clustered bar per month, which makes trend reading a memory exercise.
  • Consistent color encoding: one meaning per color across the whole workbook; restrained palette; color-blind-safe defaults.
  • Tooltips carry context (grain, filters in effect, last refresh), not clutter.
  • Parameters and dashboard actions for interactivity instead of many near-duplicate sheets.

Step 6: make it maintainable

Name calculated fields for what they mean (Sales per Customer (FIXED)), comment any calc a reviewer would pause on, organize fields into folders, and document data source assumptions and the refresh schedule on the workbook or a hidden readme sheet.

Deliverable

Produce a workbook plus a one-page spec containing: the question the dashboard answers, each metric with its declared grain and calc type (plain aggregate / LOD / table calc), the filter plan (which filters are context and why), the extract and refresh strategy, and a Performance Recorder result showing load under 5 seconds on the target data volume.

Do NOT

  • Do not ship AVG of a measure when the request was an average per entity - that is the FIXED-LOD case, and the plain AVG is silently wrong.
  • Do not promote filters to context casually; context filters change what FIXED LODs see, altering numbers, not just speed.
  • Do not blend two large sources on a high-cardinality field; restructure as a join or relationship.
  • Do not build one mega-dashboard for five audiences; each extra question costs every user load time.
  • Do not "optimize" before Performance Recorder shows where time goes; the slow part is usually one query, not the rendering.

Quality bar

Ship only when: every displayed number has a stated grain and reconciles to a SQL spot-check at that grain; filter behavior on FIXED metrics is intentional and documented; load time is under 5 seconds on production-size data; each view's marks are in the low thousands; color has one meaning per hue workbook-wide; and a second analyst can find every input field from the folder structure alone.

04 同仓库更多 Skills

SkillMedev
SkillMedev/skills

zone-2-cardio-plan

Use when someone asks to build a steady-state cardio plan, train an aerobic base or Zone 2, structure easy or endurance weekly cardio, train by heart-rate zones, or improve resting heart rate, VO2, or endurance. Builds a heart-rate-zone aerobic training block with session structure, modality choice, and progression. General fitness guidance, not medical advice. Do NOT use to design a strength or lifting program (use Strength Training Plan), high-intensity interval conditioning, HIIT, or circuits (use Conditioning & HIIT Program), or a mobility/flexibility routine (use Mobility Routine).

★ 25
SkillMedev
SkillMedev/skills

youtube-script-writer

Writes retention-engineered long-form YouTube scripts on a hook/body/payoff architecture - a first-30-seconds hook that survives the retention cliff, a beat-sheet body with mini-hooks and bridges, timed pattern interrupts, and a payoff that over-delivers - with B-roll and editing cues marked inline. Use when someone says "script my next video", "my retention graph dies at the start", "tighten this draft", or "outline a video on X". Do NOT use for the 3-second opener of TikTok, Reels, or Shorts - use video-hook-writer instead; do NOT use for spoken voiceover synced to on-screen tutorial actions - use narration-script instead; do NOT use for a sales demo built on a buyer's discovery notes - use demo-script instead; do NOT use to design the thumbnail and title - use thumbnail-concept instead.

★ 25
SkillMedev
SkillMedev/skills

win-back-campaign

Designs segmented win-back email sequences for dormant users - dormancy tiers, a three-beat sequence with a single proportional incentive, and a suppression rule - and measures success by re-activation, not opens. Use when someone says "our users went quiet", "design a win-back campaign", "how do I re-engage lapsed customers", "should we email people who haven't logged in for months", or lifecycle messaging has stopped landing with a lapsed segment. Do NOT use for recovering an unfinished checkout - use abandoned-cart-sequence instead. Do NOT use for diagnosing and fixing why active customers cancel - use churn-reduction instead. Do NOT use for building always-on onboarding or nurture flows - use email-drip-builder instead.

★ 25
SkillMedev
SkillMedev/skills

wikipedia-style

Writes neutral, verifiable, encyclopedic prose following Wikipedia's core content policies and manual of style - NPOV, inline citations, notability-backed claims, and a strict ban on promotional language. Use when someone asks "write this like a Wikipedia article", "draft a Wikipedia page for this company or person", "make this neutral and encyclopedic", or "why does my article draft keep getting rejected". Do NOT use for persuasive or opinion writing - use op-ed-writer instead; for thesis-driven academic papers, use academic-essay; for verifying claims in existing text, use fact-checker.

★ 25
SkillMedev
SkillMedev/skills

whitepapers

Structures and writes authoritative B2B whitepapers - a standalone executive summary, a data-sized problem statement, methodology, evidence-driven findings, recommendations, and a soft call to action - flagging every claim that needs a real citation. Use when a marketer asks "write a whitepaper on this topic", "turn our research into a lead-gen asset", "make this credible enough for executives", or a draft reads like a product pitch instead of analysis. Do NOT use for customer-story-driven proof - use case-study-builder instead; for policy audiences, use policy-brief.

★ 25
SkillMedev
SkillMedev/skills

white-space-analysis

Finds unmet market gaps by ranking jobs-to-be-done on importance versus satisfaction, overlaying them against current solutions and workarounds, and validating that each gap is real, winnable, and worth winning. Use when someone asks "where are the gaps in this market", "what's underserved here", "where should we play next", or is hunting for product, feature, or market-entry opportunities. Do NOT use for profiling competitors and building battle cards - use competitive-intelligence instead; for putting a dollar figure on an identified opportunity - use market-sizing instead; for extracting jobs-to-be-done from raw customer interviews - use jtbd-extractor instead.

★ 25