Skip to main content

Star Schema trong Power BI — Nền tảng mọi dashboard tốt

10 phút

Star Schema là gì?

Star schema là mô hình dữ liệu gồm 1 fact table (bảng sự kiện) kết nối với nhiều dimension tables (bảng chiều) qua relationship 1-nhiều. Nhìn từ trên xuống như hình ngôi sao.

Fact Table vs Dimension Table

  • Fact table: lưu số liệu đo lường (revenue, quantity, cost). Mỗi dòng = 1 transaction/event. Thường có nhiều dòng (hàng triệu).
  • Dimension table: lưu thông tin mô tả (Product, Customer, Date, Region). Ít dòng, nhiều cột mô tả.

Ví dụ thực tế: Dashboard bán lẻ

Fact_Sales (fact):
  - date_key, product_key, store_key, customer_key
  - quantity, unit_price, discount, total_amount

Dim_Date (dimension): date_key, date, month, quarter, year, weekday
Dim_Product: product_key, name, category, brand, cost
Dim_Store: store_key, name, city, region, area_sqm
Dim_Customer: customer_key, name, segment, city, join_date

Tại sao Power BI ưa star schema?

VertiPaq engine (công cụ lưu trữ của Power BI) tối ưu cho relationship 1-nhiều. Star schema = ít relationship = ít ambiguous filter path = DAX đơn giản hơn nhiều.

Sẵn sàng xây dựng dashboard Power BI?

Kết nối với freelancer Power BI đã kiểm duyệt, xem báo cáo nhúng ngay trên trình duyệt và tải file .pbix về sau khi thanh toán.

ĐN

Đào Ngọc Tú

Data Architect

Cộng tác viên chuyên gia tại SenData. Chia sẻ kiến thức về phát triển Power BI, trực quan hóa dữ liệu và best practice business intelligence.

Đọc tiếp

Quay lại tất cả bài viết
Star Schema trong Power BI — Nền tảng mọi dashboard tốt | SenData