Tableau Guide — Dimensions, Measures, Dashboards & Calculated Fields
Tableau is a leading data visualization tool that lets anyone connect to data, create interactive dashboards, and share insights without coding.
What You’ll Learn
In this tutorial, you’ll learn Tableau fundamentals: dimensions vs measures, building worksheets and dashboards, calculated fields, Level of Detail (LOD) expressions, connecting to data sources, and building a sales dashboard.
Why It Matters
Tableau is used by 80,000+ organizations worldwide for business intelligence. It’s the #1 analytics platform according to Gartner. Knowing Tableau is valuable for data analysts, business analysts, and anyone who needs to communicate data-driven insights.
Real-World Use
A retail company uses Tableau dashboards to track daily sales by region, product category, and store. Executives see real-time KPIs; regional managers drill into their territories; analysts build calculated fields for profit margins. DodaTech uses Tableau for internal analytics and reporting.
graph TD A[Data Sources] --> B[Tableau Desktop] B --> C[Worksheets] C --> D[Dashboards] C --> E[Stories] D --> F[Tableau Server / Cloud] F --> G[Web Viewers] F --> H[Mobile Viewers] style B fill:#4f46e5,color:#fff
Dimensions vs Measures
| Type | Definition | Examples | Color |
|---|---|---|---|
| Dimension | Categorical data (discrete) | Region, Product, Date, Customer | Blue |
| Measure | Numerical data (continuous) | Sales, Profit, Quantity, Discount | Green |
Key insight: Dimensions slice your data. Measures are what you measure. You place dimensions on rows/columns and measures on the marks card.
Building a Worksheet
1. Connect to data: CSV, Excel, SQL database, cloud service
2. Drag "Region" to Columns shelf
3. Drag "Sales" to Rows shelf → bar chart
4. Drag "Category" to Color on Marks card
5. Drag "Date" to Filters → show last 12 months
6. Drag "Profit" to Label on Marks cardCalculated Fields
Calculated fields are custom formulas you create from existing fields.
// Profit Margin (calculated field)
SUM([Profit]) / SUM([Sales])
// Year-over-Year Growth
(SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / ABS(LOOKUP(SUM([Sales]), -1))
// Discount Category
IF [Discount] > 0.3 THEN "High"
ELSEIF [Discount] > 0.1 THEN "Medium"
ELSE "Low"
ENDLOD Expressions (Level of Detail)
LOD expressions let you compute at different granularities than the view level.
// Sales as % of total (across all regions)
SUM([Sales]) / SUM({SUM([Sales])})
// Customer's first purchase date
{FIXED [Customer ID] : MIN([Order Date])}
// Sales per customer (by region)
AVG({FIXED [Customer ID] : SUM([Sales])})
// Sales for each region as % of category total
SUM([Sales]) / SUM({FIXED [Category] : SUM([Sales])})Types of LOD
| Type | Description |
|---|---|
| FIXED | Computes using specified dimensions, ignoring view dimensions |
| INCLUDE | Computes using specified dimensions IN ADDITION to view dimensions |
| EXCLUDE | Computes EXCLUDING specified dimensions from view |
Building a Sales Dashboard
# Simulating sales data that you'd import into Tableau
import pandas as pd
import random
from datetime import datetime, timedelta
data = []
regions = ["North", "South", "East", "West"]
categories = ["Electronics", "Clothing", "Food", "Books"]
for _ in range(1000):
data.append({
"Order Date": datetime(2025, 1, 1) + timedelta(days=random.randint(0, 545)),
"Region": random.choice(regions),
"Category": random.choice(categories),
"Sales": round(random.uniform(10, 500), 2),
"Profit": round(random.uniform(-50, 200), 2),
"Quantity": random.randint(1, 10),
"Discount": round(random.uniform(0, 0.4), 2),
})
df = pd.DataFrame(data)
print("Sample of 5 rows:")
print(df.head())
print(f"\nTotal sales: ${df['Sales'].sum():,.2f}")
print(f"Categories: {df['Category'].value_counts().to_dict()}")Expected output:
Sample of 5 rows:
Order Date Region Category Sales Profit Quantity Discount
2025-01-15 North Electronics 245.30 45.20 3 0.05
2025-03-22 South Clothing 89.50 12.00 1 0.20
...
Total sales: $284,567.89
Categories: {'Electronics': 260, 'Clothing': 252, 'Food': 248, 'Books': 240}Sales Dashboard Components
- KPI cards: Total Sales, Total Profit, Profit Margin, Avg Order Value
- Time series: Monthly sales trend (line chart)
- Regional breakdown: Sales by region (bar chart) — color by profit
- Category comparison: Sales vs Profit by category (scatter plot)
- Top products: Top 10 products by sales (horizontal bar)
- Filters: Date range, Region, Category (interactive)
Connecting to Data Sources
Tableau connects to:
- Files: Excel, CSV, JSON, PDF, spatial files
- Databases: SQL Server, PostgreSQL, MySQL, Oracle, Snowflake
- Cloud: AWS Redshift, Google BigQuery, Azure SQL
- Connectors: ODBC, JDBC, REST API (Tableau Bridge)
Common Mistakes
- Confusing dimensions and measures: Tableau auto-detects, but sometimes misclassifies. Check the data type and change if needed.
- Using aggregations incorrectly: Sales should be SUM, not AVG (unless you mean average order value). Check your aggregation.
- Ignoring data source filters: Extract filters reduce data loaded into memory. Apply them early, not on worksheets.
- Overloading dashboards: More than 5-7 views per dashboard overwhelms users. Use tabs or drill-downs instead.
- Not using parameters: Parameters allow users to switch between measures, change thresholds, or toggle views without editing.
Practice Questions
What’s the difference between a dimension and a measure? Dimensions are categorical (discrete, blue). Measures are numerical (continuous, green). Dimensions slice data; measures quantify it.
What does a LOD expression with FIXED do? It computes at the specified level regardless of the view’s dimensions. Useful for percent-of-total calculations.
What is a calculated field? A custom formula you create from existing fields, like profit margin = SUM(Profit)/SUM(Sales).
How do you make a dashboard interactive in Tableau? Use filters (shown as quick filters), parameters, actions (filter dashboard, highlight, URL), and drill-down hierarchies.
What’s the difference between extract and live connection? Extract loads data into Tableau’s engine (faster, but scheduled refresh needed). Live queries the database in real time (always current, but dependent on DB performance).
Challenge
Connect Tableau to a free public dataset (like NYC taxi trips or Superstore sample data). Build a dashboard with at least 5 views, interactive filters, and a drill-down path from region → state → city.
Real-World Task
Download your personal bank transaction CSV. Connect it to Tableau. Build a spending dashboard: category breakdown, monthly trend, and top merchants.
Mini Project: Performance Dashboard
Build a Tableau dashboard analyzing internet speed test data (download, upload, latency). Show trends over time, distribution by hour, and compare ISPs.
Security angle: Tableau dashboards should respect data access controls. Always test with a low-privilege user to ensure sensitive data is hidden.
What’s Next
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.
What’s Next
Congratulations on completing this Tableau guide! Here’s where to go from here:
- Practice daily — Consistency is more important than long study sessions
- Build a project — Apply what you learned by building something real
- Explore related topics — Check out other tutorials in the same category
- Join the community — Discuss with other learners and share your progress
Remember: every expert was once a beginner. Keep coding!
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro