Tableau for Data Analysts
Calculated fields, LOD expressions, parameters, dashboard actions, and a clear Power BI vs Tableau decision guide — for analysts choosing between the two.
Tableau is not the most common tool in Indian job listings — Power BI holds that position — but it remains the gold standard for visual analytics at global companies and data-heavy MNCs. A data analyst who knows both tools is immediately more hireable for international clients, US-facing teams, and companies that standardised on Salesforce or Tableau CRM.
More importantly, Tableau's philosophy of drag-and-drop exploration with a deeply expressive calculation language teaches you to think about data visualisation differently. Many analysts who learned Power BI first find that Tableau sharpens their instincts about visual grammar and what makes a chart genuinely useful rather than merely populated.
This chapter covers Tableau Desktop from first connection to advanced techniques — calculated fields, LOD expressions, parameters, dashboard actions, and publishing to Tableau Public. At the end we compare Tableau and Power BI honestly so you can decide how much time to invest in each.
Tableau Interface: The Mental Model
Tableau's interface is built around one fundamental concept: Dimensions (categorical fields — text, dates, IDs) go on Rows and Columns to define the structure of the view. Measures (numerical fields) go onto the Marks card to define what is being shown. Everything else — colour, size, tooltip, detail, label — lives on the Marks card as well.
Key Interaction Shortcuts
| Action | How to do it |
|---|---|
| Show Me (chart type selector) | Ctrl + 1 (or click Show Me top-right) |
| Swap Rows and Columns | Ctrl + W |
| Fit view to window | Ctrl + Shift + F |
| Duplicate sheet | Right-click sheet tab → Duplicate |
| Create a calculated field | Right-click in Data pane → Create Calculated Field |
| Quick table calculation | Right-click measure on Marks → Quick Table Calculation |
| Undo | Ctrl + Z (up to 100 steps) |
Calculated Fields
Calculated fields let you create new fields from existing data using Tableau's calculation language. There are three types — row-level calculations, aggregate calculations, and table calculations — and understanding the difference prevents the most common errors.
Row-Level Calculations (compute per row before aggregation)
// Profit Margin per row
[Profit] / [Sales]
// Classify order size
IF [Quantity] >= 10 THEN "Bulk"
ELSEIF [Quantity] >= 5 THEN "Medium"
ELSE "Small"
END
// Days to ship
DATEDIFF('day', [Order Date], [Ship Date])
// Clean a string field
UPPER(TRIM([Region]))Aggregate Calculations (compute on the aggregated values)
// Average order value SUM([Sales]) / COUNT([Order ID]) // % of total (needs table calc or LOD — see below) SUM([Profit]) / TOTAL(SUM([Profit])) // Running total (Quick Table Calc → Running Total) // Applied as a table calculation on SUM([Sales])
String, Date and Logical Functions Reference
| Function | Syntax | Returns |
|---|---|---|
| DATETRUNC | DATETRUNC('month', [Order Date]) | First day of the month |
| DATENAME | DATENAME('month', [Order Date]) | "January", "February"… |
| DATEPART | DATEPART('year', [Order Date]) | Integer year (2024) |
| ZN | ZN([Sales]) | Replace NULL with 0 |
| ISNULL | ISNULL([Discount]) | TRUE if NULL |
| IIF | IIF([Sales] > 1000, "High", "Low") | Inline IF (faster than IF/END) |
| LEFT / RIGHT | LEFT([Product Name], 5) | First 5 characters |
| CONTAINS | CONTAINS([Product Name], "Table") | TRUE if substring found |
| WINDOW_AVG | WINDOW_AVG(SUM([Sales]), -2, 0) | 3-period rolling average |
LOD Expressions — The Most Powerful Feature in Tableau
LOD (Level of Detail) expressions let you compute aggregations at a dimension granularity that is different from the granularity of the current view. This solves a class of problems that are genuinely difficult in Power BI without complex DAX.
FIXED — Customer's First Order Date
// First order date per customer (ignores any date filter in the view)
{ FIXED [Customer ID] : MIN([Order Date]) }
// Days since first order (row-level calc using the LOD above)
DATEDIFF('day',
{ FIXED [Customer ID] : MIN([Order Date]) },
[Order Date]
)FIXED — Revenue Contribution % (% of Total)
// Total revenue across ALL rows, regardless of what's in the view
{ FIXED : SUM([Sales]) }
// % share for the current dimension in the view
SUM([Sales]) / { FIXED : SUM([Sales]) }INCLUDE — Average Order Value per Customer in a Regional View
// Average order value per customer, computed at order granularity,
// displayed in a region-level view
{ INCLUDE [Order ID] : SUM([Sales]) }
// → drag this onto Rows and aggregate with AVG()EXCLUDE — Compare Each Region to the Overall Average
// Overall average sales (excludes Region from view's granularity)
{ EXCLUDE [Region] : AVG([Sales]) }
// In a bar chart of Sales by Region, add this as a reference line
// or subtract it to show above/below averageParameters: Making Dashboards Interactive
Parameters are user-controlled variables you create in Tableau. Unlike filters (which filter data), parameters feed values into calculated fields, reference lines, and bin sizes — giving users dynamic control over what the view shows.
Creating and Using a Parameter
// Step 1: Create the parameter // Right-click in Data pane → Create Parameter // Name: "Select Metric" // Data type: String // Allowable values: List // Add values: "Sales", "Profit", "Quantity" // Step 2: Create a calculated field that uses the parameter CASE [Select Metric] WHEN "Sales" THEN [Sales] WHEN "Profit" THEN [Profit] WHEN "Quantity" THEN [Quantity] END // Step 3: Use this calc field on Rows/Columns instead of the // individual measures. Show the parameter control on the dashboard. // Now the user can switch between metrics without changing the sheet.
Parameter for Dynamic Top-N Filter
// Create parameter: "Top N Products" // Data type: Integer, Range: 1–20, Step: 1, Default: 10 // Create a calculated field: RANK(SUM([Sales])) // Add this rank field to Filters, show only rank <= [Top N Products] // Add the parameter control to the dashboard — the Top N list updates live
Dashboard Actions: Cross-Filter, URL, and Highlight
Dashboard Actions wire sheets together so that interacting with one chart filters, highlights, or navigates within others. They are what separate a Tableau dashboard from a collection of charts on a slide.
Tableau Public: Your Free Portfolio Platform
Tableau Public is a free cloud hosting service for Tableau workbooks. Every dashboard you publish gets a public URL you can share on LinkedIn, add to your resume, and embed in your portfolio website. It is one of the best free tools in data analytics for portfolio building.
Publishing workflow: 1. Build your dashboard in Tableau Desktop (or Tableau Public Desktop app) 2. File → Save to Tableau Public → sign in with free account 3. Your workbook uploads and gets a URL: public.tableau.com/views/[your-workbook-name] 4. From the published view: → Share: copy the embed code for your portfolio site → Download: viewers can download your .twbx file → Subscribe: viewers can subscribe to email snapshots Portfolio tip: publish 3–5 dashboards covering different chart types — a map, a scatter plot, a KPI scorecard, a cohort table, and a bar/line combo. Tableau Public profiles rank in Google — your name + "data analyst" becomes findable without needing a personal website.
Power BI vs Tableau: An Honest Comparison
This question comes up in almost every analyst's learning journey. Here is an honest breakdown based on the Indian job market and the nature of each tool.
| Dimension | Power BI | Tableau |
|---|---|---|
| Indian job market demand | ⭐⭐⭐⭐⭐ Very High — most listings | ⭐⭐⭐ Moderate — MNCs and global companies |
| Licensing cost | Free (Desktop) · ₹715/user/mo (Pro) | ~₹5,500/user/mo (Creator) — significantly more |
| Microsoft ecosystem fit | 🟢 Deep — Excel, Azure, Teams, SharePoint | 🔴 Separate ecosystem — Salesforce/Tableau CRM |
| Calculation language | DAX — powerful but verbose | Tableau Calc + LOD — more intuitive for many analysts |
| Visual exploration speed | 🟡 Moderate — report-first design | 🟢 Fast — drag-and-drop built for exploration |
| LOD / granularity control | DAX CALCULATE + context — complex | LOD expressions — cleaner syntax for this use case |
| Free version | Power BI Desktop (full-featured) | Tableau Public (data must be public) |
| Best for | Enterprise BI, Indian corporate reporting, Microsoft-integrated orgs | Ad-hoc exploration, US-facing companies, Salesforce orgs, visual analysts |
| Portfolio platform | PowerBI.com publish (limited free tier) | Tableau Public (fully free, Google-indexed) |
Learn Power BI first — it covers 80% of Indian job requirements. Once you are comfortable with DAX and the service, spend 3–4 weeks on Tableau. The skills transfer well, the visual thinking is complementary, and being able to write "Power BI + Tableau" on your resume opens doors at global companies that locked in Tableau before Power BI matured.
6 Tableau Best Practices for Data Analysts
Quick-Reference: Tableau Calculation Cheat Sheet
| Goal | Calculation / Technique |
|---|---|
| % of total within category | { EXCLUDE [Sub-Category] : SUM([Sales]) } → use in % formula |
| Customer first purchase date | { FIXED [Customer ID] : MIN([Order Date]) } |
| Running total | Quick Table Calculation → Running Total on SUM([Sales]) |
| Period-over-period % change | Quick Table Calc → Percent Difference → Relative to previous |
| Moving average (3 periods) | WINDOW_AVG(SUM([Sales]), -2, 0) |
| Dynamic top-N filter | RANK(SUM([Sales])) ≤ [Top N parameter] |
| Bin a continuous measure | Right-click measure in Data pane → Create → Bins → set bin size |
| Dual axis chart | Drag a second measure to right edge of view until green line appears → Synchronise Axes |
| Reference line (average) | Right-click axis → Add Reference Line → Line → Average |