🎯 Mục tiêu bài học
Sau bài học này, bạn sẽ:
✅ Cài đặt và setup Tableau Desktop / Tableau Public
✅ Hiểu Tableau interface: Data pane, Marks card, Shelves
✅ Connect data từ Excel, CSV, database
✅ Tạo Bar, Line, Scatter, Map charts
✅ Viết Calculated Fields và LOD Expressions cơ bản
✅ Build dashboard đầu tiên với filter actions
Thời gian: 45 phút | Độ khó: Beginner | Tool: Tableau Public (Free) hoặc Tableau Desktop
📖 Bảng Thuật Ngữ Quan Trọng
| Thuật ngữ | Tiếng Việt | Mô tả |
|---|---|---|
| Dimension | Chiều | Categorical data: Region, Category, Date |
| Measure | Thước đo | Numeric data: Sales, Profit, Quantity |
| Marks Card | Thẻ dấu hiệu | Controls visual encoding: Color, Size, Label |
| Shelf | Kệ | Rows/Columns — nơi drop fields |
| Calculated Field | Trường tính toán | Custom formula trong Tableau |
| LOD Expression | Biểu thức Level of Detail | FIXED, INCLUDE, EXCLUDE — tính toán ở level khác |
| Filter Action | Hành động lọc | Click chart → filter charts khác |
| Tooltip | Chú thích hover | Thông tin hiện khi hover lên data point |
| Dual Axis | Trục kép | 2 measures trên cùng 1 chart |
| Context Filter | Bộ lọc ngữ cảnh | Filter ưu tiên, áp dụng trước |
Checkpoint
Dimension = categorical (text), Measure = numeric. Marks Card controls color/size/label. LOD = FIXED/INCLUDE/EXCLUDE. Bạn phân biệt được chưa?
🖥️ 1. Tableau Products Overview
1.1 Tableau Family
| Product | Purpose | Cost |
|---|---|---|
| Tableau Desktop | Create visualizations | $70/mo |
| Tableau Public | Free version (public data only) | Free |
| Tableau Server | Share internally | Enterprise |
| Tableau Online | Cloud sharing | $42/user/mo |
| Tableau Prep | Data preparation | Included |
1.2 Installation
For learning: Tableau Public (Free)
- Download từ public.tableau.com
- Install và create account
- Limitation: Saves to public cloud only
For work: Tableau Desktop
- Download trial từ tableau.com
- 14-day free trial
- Full features
Bắt đầu với Tableau Public — hoàn toàn miễn phí, đủ tính năng để học. Chỉ giới hạn: data phải save lên cloud public.
Checkpoint
Tableau Public = free, save public. Tableau Desktop = full features, $70/mo. Tableau Prep = data preparation. Bạn đã cài đặt chưa?
🗺️ 2. Tableau Interface
2.1 Start Page
| CONNECT | OPEN |
|---|---|
| To a File: Excel, Text file, JSON, More... | Recent Workbooks: Sales_Dashboard.twb, Marketing_Report.twb |
| To a Server: Tableau Server, MySQL, PostgreSQL, More... | Sample Workbooks: Superstore, World Indicators |
| DISCOVER: Viz of the Day |
2.2 Workspace
| Khu vực | Vị trí | Nội dung |
|---|---|---|
| Menu Bar | Top | File, Data, Worksheet, Dashboard, Story, Analysis, Map, Format, Server |
| Data Pane | Left | Tables (Orders, Customers, Products), Dimensions (Category, Region, Segment, Ship Mode), Measures (Sales, Profit, Quantity, Discount) |
| Canvas | Center | Your visualization appears here — drop fields to build |
| Shelves | Center-top | Columns, Rows |
| Sheet Tabs | Bottom | Sheet 1, Sheet 2, [+], Dashboard 1, Story 1 |
2.3 Key Terms
| Term | Definition |
|---|---|
| Dimension | Categorical data (Region, Category, Date) |
| Measure | Numeric data (Sales, Profit, Quantity) |
| Rows/Columns | Shelves định vị data |
| Marks | Visual elements (bars, lines, points) |
| Filters | Limit data displayed |
| Pages | Animation/stepping through data |
Checkpoint
Tableau workspace: Data pane (bên trái) chứa Dimensions + Measures. Canvas (giữa) hiển thị visualization. Marks card controls Color/Size/Label. Bạn đã explore interface chưa?
🔌 3. Connecting to Data
3.1 Data Source Page
| Khu vực | Nội dung |
|---|---|
| Connections | Sample-Superstore (Excel) |
| Sheets | Orders (1000 rows), People (4 rows), Returns (296 rows) |
| Canvas | Drag tables here to relate them |
| Preview | First 1000 rows: Row ID, Order ID, Order Date, Ship Date... |
3.2 Supported Data Sources
Files: Excel, CSV, JSON, PDF (tables)
Databases: MySQL, PostgreSQL, SQL Server, BigQuery, Snowflake, Redshift
Cloud Apps: Google Sheets, Salesforce, Google Analytics
3.3 Data Prep Basics
Tableau auto-detect data types nhưng đôi khi sai. Luôn kiểm tra data types sau khi connect — đổi text sang date, string sang number nếu cần.
Checkpoint
Tableau connect được Files (Excel, CSV), Databases (SQL Server, MySQL), và Cloud (Google Sheets). Luôn kiểm tra data types sau khi connect!
📊 4. Building Basic Charts
4.1 Bar Chart — Category Sales
Steps:
- Drag
Categoryto Columns - Drag
Salesto Rows - Done!
| Category | Sales |
|---|---|
| Office Supplies | ~$800K (cao nhất) |
| Furniture | ~$400K |
| Technology | ~$400K |
Enhancements:
- Sort: Click sort icon in toolbar
- Color: Drag
Categoryto Color - Labels: Click Label in Marks card
4.2 Line Chart — Sales Trend
Steps:
- Drag
Order Dateto Columns (auto-becomes YEAR) - Click + on date to expand to Quarter or Month
- Drag
Salesto Rows
Trend line shows seasonal peaks:
- Q1 2022: ~40K → Q3: ~40K
- Q1 2023: ~80K → Q3: ~$100K
- Overall upward trend với seasonal fluctuation
4.3 Scatter Plot — Profit vs Sales
Steps:
- Drag
Salesto Columns - Drag
Profitto Rows - Drag
Categoryto Color
4.4 Map — Sales by State
Steps:
- Double-click
State(auto-generates map) - Drag
Salesto Color
Tableau = Drag & Drop. Bar chart chỉ cần 2 bước: Dimension → Columns, Measure → Rows. Marks card controls Color, Size, Label — experiment nhiều!
Checkpoint
Bar = Dimension → Columns + Measure → Rows. Line = Date → Columns. Scatter = Measure × Measure. Map = Double-click geographic field. Bạn đã tạo chart đầu tiên chưa?
🎨 5. Formatting & Polish
5.1 Marks Card
| Element | Chức năng |
|---|---|
| [Automatic ▼] | Chart type selector |
| ● Color | Color encoding |
| ○ Size | Size encoding |
| Abc Label | Data labels |
| ◐ Detail | Add detail level |
| △ Tooltip | Hover info |
5.2 Custom Tooltips
Default tooltip:
1Category: Technology2Sales: $836,154Custom tooltip:
1📱 {Category}2💰 Revenue: ${Sales}3📈 Growth: {Profit Ratio}%4Click to see details →Edit: Worksheet → Tooltip
5.3 Reference Lines
Add context: Average line, Target line, Trend line, Bands
1Analytics Pane → Drag Reference Line to chartCheckpoint
Marks card: Color, Size, Label, Tooltip, Detail. Custom tooltips thêm context cho hover. Reference lines từ Analytics Pane thêm benchmarks. Đã customize Marks chưa?
🔍 6. Filters & Calculated Fields
6.1 Filter Types
| Type | How to Add | Use |
|---|---|---|
| Dimension Filter | Drag to Filters | Include/exclude categories |
| Measure Filter | Drag to Filters | Range of values |
| Date Filter | Drag to Filters | Date range |
| Context Filter | Right-click → Add to Context | Filter áp dụng trước |
6.2 Show Filter Control
Right-click filter → Show Filter
- ☑ Furniture
- ☑ Office Supplies
- ☐ Technology ← User can toggle
6.3 Common Calculations
1-- Profit Margin2[Profit] / [Sales]34-- Running Total5RUNNING_SUM(SUM([Sales]))67-- Rank8RANK(SUM([Sales]))910-- IF Statement11IF [Profit] > 0 THEN "Profitable" ELSE "Loss" END6.4 LOD Expressions
1-- Fixed: Calculate at specific level2{ FIXED [Category] : SUM([Sales]) }34-- Include: Add dimension to calculation5{ INCLUDE [Product] : AVG([Discount]) }67-- Exclude: Remove dimension8{ EXCLUDE [Region] : SUM([Profit]) }LOD Expressions là advanced feature — FIXED tính ở level cố định bất kể filter context. Rất mạnh nhưng cần hiểu rõ trước khi dùng.
Checkpoint
Filters: Dimension (categories), Measure (ranges), Context (priority). Calculated Fields: IF/CASE logic, running totals. LOD: FIXED/INCLUDE/EXCLUDE for cross-level calculations!
🏋️ 8. Hands-on: Build Sales Dashboard
Build dashboard hoàn chỉnh với Sample Superstore data!
Data: Sample Superstore (included in Tableau)
Sheet 1: Sales by Category
1Columns: Category2Rows: SUM(Sales)3Color: Category4Sort: Descending, Labels: ShowSheet 2: Monthly Trend
1Columns: MONTH(Order Date)2Rows: SUM(Sales)3Add: SUM(Profit) as dual axis4Color: Measure NamesSheet 3: Regional Map
1Double-click: State2Color: SUM(Sales), Size: SUM(Profit)Sheet 4: Top Products
1Rows: Product Name2Columns: SUM(Sales)3Filter: Top 10 by Sales4Sort: DescendingCombine into Dashboard
Dashboard → New Dashboard — Size: Fixed (1200 x 800)
| Vị trí | Nội dung |
|---|---|
| Top Row | Sales · Profit · Orders (KPI tiles) |
| Middle Left | Sales by Category |
| Middle Right | Monthly Trend |
| Bottom Left | Regional Map |
| Bottom Right | Top 10 Products |
Add Filter actions for interactivity!
📋 Tổng kết
Kiến thức đã học
| Chủ đề | Nội dung chính | Tầm quan trọng |
|---|---|---|
| Products | Desktop, Public, Prep, Server | Overview |
| Interface | Data pane, Marks, Shelves | Core navigation |
| Data | Connect files, databases, cloud | Foundation |
| Charts | Bar, Line, Scatter, Map | Core skills |
| Formatting | Marks card, Tooltips, Ref lines | Polish |
| Filters | Dimension, Measure, Context, LOD | Advanced |
| Dashboard | Combine sheets, filter actions | Capstone |
Câu hỏi tự kiểm tra
- Dimensions và Measures khác nhau thế nào trong Tableau?
- Context Filter khác Filter thông thường thế nào?
- Dual Axis dùng trong trường hợp nào?
- Marks card có những thành phần nào?
Bài tiếp theo: Power BI Fundamentals — So sánh với Tableau và build reports trong Power BI Desktop!
🎉 Tuyệt vời! Bạn đã biết cách tạo visualization trong Tableau!
Nhớ: Marks card là trái tim của Tableau — thành thạo Color, Size, Label, Detail là bạn thành thạo Tableau!
