1. **INTRODUCTION**:
- Overview of BI process
- Overview of different Power BI products:
+ Thường xuyên tiếp xúc:
* Power BI desktop ->> report creators
* Power BI service
* Power BI gateway
* Power BI datasets
* Power BI dataflow
+ Ít tiếp xúc hơn:
* Power BI embeded
* Power BI mobile app
---
2. **POWER QUERY - ADVANCED DATA TRANSFORMATION**
- ***Data source:***
+ File: csv, excel, json,...
+ Database: MySQL, PostgreSQL, Oracle, Bigquery,...
+ Online service: Salesforce, Sharepoint, Google Ads,...
+ Other: Webpage...
- ***Pivot and unpivot:***
+ Pivot data: to create a summrized table with a new layout, aggregateing values based on column categories.
+ Unpivot data: to transform a pivoted table back to flat list format, making it easier to analyze.
- ***Splitting and combining columns:***
+ Split a single column into multiple columns by delimiters or character count.

+ Combine two or more columns into one using custom separators.
Click chọn 2 cột cần gộp chung sau đó nhấn chuột phải chọn "Merge columns"


**Kết quả:**

- ***Filtering and sorting data:***
+ Filer data by applying criteria to columns, such as text, numeric, or date filters.
+ Sort data in ascending or descending order based on one or more columns
- ***Removing duplicates:*** Eliminate duplicate rows in your dataa to ensure accuracy and consistency
- **Promote and demote column headers:**
+ Promote header: chọn "Use first row as header"
--> chọn dòng đầu tiên làm tiêu đề
+ Demote header: chọn "Use head.er as first row"
--> chọn tiêu đề làm dòng đầu tiên.

- ***Filter by row position:***

- ***Choose and remove columns:***
+ Choose columns: Chọn các cột cần giữ lại cho báo cáo

+ Remove columns: Xóa các cột không cần thiết cho báo cáo

- ***Formatting columns:***
- Cách 1:

- Cách 2: Click chuột phải vào cột cần formating.

- ***Transpose table:*** Sẽ sử dụng nhiều khi xử lý các file json.

---
3. **POWER QUERY - CREATE COLUMN**
- ***Create Date columns***


- ***Create Index columns:***

- ***Create conditional columns:***





- ***Create custom columns***



-----------
4. **POWER QUERY - COMBINE DATA**
- ***Merging queries:***



- ***Append queries:***


- ***Combine files:***
Các phòng ban như Đào tạo, Nhân sự thường sẽ có nhiều file cùng 1 format lưu trữ từ nhiều tháng --> khi làm báo cáo cần tổng hợp các file này thành 1 bảng khi đó ta sẽ sử dụng "combine files".

- ***Duplicate a query:***
**Cách 1:** Click chuột phải vào bảng cần duplicate --> chọn "Duplicate" như hình dưới

**Cách 2:** Chọn advanced editor -> copy all -> blank query -> paste code vào và enter

---
5. **DATA PROFILING**
- Column distribution
- Column quality
- Column profile
---
6. **DATA MODELING**
- **Data model:** là tập hợp của:
- Các bảng dữ liệu đã tải về
- Mỗi quan hệ giữa các bảng này
- Các measures tính toán đã thiết lập
- **Fact table:**
+ Chứa các dữ liệu của các quan sát hoặc các sự kiện như bảng tổng hợp các hóa đơn bán hàng - bao gồm: mặt hàng, số lượng mua, giá mua, tổng bill....
+ Fact table có thể chứa các dữ liệu trùng lặp nhau.
- **Dim table (Dimension/Lookup table):**
+ Là bảng lưu trữ các thông tin chi tiết về dữ liệu có trong bảng fact như: thông tin sản phẩm, thông tin nhà cung cấp, ngày ....
+ Dim table chứa các dữ liệu không trùng lặp.
- **Star schema:**
Là một kiến trúc data warehouse mà tại đó 1 bảng fact được giải thích chi tiết bởi các bảng dimension.

- **Snowflake schema:**
+ Là bảng nâng cấp của Star schema, Snowflake schema chuẩn hóa các bảng dimension thành nhiều bảng dimension phụ trợ cho các bảng dimension trong Star schema
+ Hình ảnh:

- **Relationship (Mối quan hệ):**
+ Relationship tạo ra mối liên kết giữa 2 bảng nhằm xác định mối liên quan giữa các trường dữ liệu của 2 bảng.
+ **Ví dụ:** Muốn biết khách hàng A01 trong bảng Customer mua những mặt hàng gì và ngày nào trong bảng Transaction thì phải tạo mối quan hệ giữa 2 bảng này.
+ Các loại relationship:
* ***Quan hệ 1-1:*** Trong quan hệ này mỗi bảng chỉ có 1 bảng ghi tương ứng.

* ***Quan hệ 1-n:*** Là quan hệ phổ biến và thường gặp nhất trong cơ sở dữ liệu, trong quan hệ này 1 bảng ghi ở bảng này có nhiều bảng ghi tương ứng với bảng kia.

* ***Quan hệ n-n:*** Trong quan hệ này 1 bảng ghi trong bảng này tương ứng với nhiều bảng ghi trong bảng kia và ngược lại.
**Chú ý:** Không khuyến khích thiết lập mối quan hệ n-n trong model vì có thể dẫn đến dữ liệu trả về không đầy đủ.

- **Active and inactive relationships:**

7. **DAX - INTRODUCTION AND CORE CONCEPT**
- **Khái niệm:**
DAX là 1 tập hợp các hàm, toán tử và hằng số có thể được dùng trong 1 công thức hoặc biểu thức, để tính toán và trả về 1 hoặc nhiều giá trị. Hay đơn giản, DAX giúp bạn tạo ra thông tin mới từ dữ liệu có sẵn trong mô hình của bạn.
- **Row context:**
+ Tính toán dựa trên hàng hiện tại, ví dụ:

- **Filter context:**
+ Áp dụng một hoặc nhiều bộ lọc trong 1 phép tính nhằm xác định kết quả hoặc giá trị mong muốn.
+ **Ví dụ:** với bảng dữ liệu trên -> ta muốn xem thêm tổng TotalSales của các Category thuộc Region A
***--> Công thức:***
Doanh số Region A =
CALCULATE(SUM(TotalSales), FILTER(Tên bảng, Region = "A"))
- **Calculated column:** (Row context)
+ Là công thức DAX để thêm các cột dữ liệu mới vào bảng đã có trong model.
+ Vì tạo thêm cột mới và lưu trữ cột này trong model nên làm cho size file tăng lên.
+ Calculated columns "live" in tables
+ Primarily used for "filtering" data in reports.

- **Measures:** (Filter context)
+ Measures tạo ra các giải pháp để phân tích và báo cáo dữ liệu, thực hiện các tính toán thời gian thực dựa trên tương tác của bạn với báo cáo.
+ Không tạo ra data mới trong các bảng -> không làm tăng size file.
+ Measures "live" in visuals.
+ Primarily used for "aggregating values" in report visuals.

+ Implicit measures
+ Explicit measures
- **Calculated tables:**
+ Sử dụng DAX để tạo bảng tính mới từ các bảng có sẵn trong model.

**TIPS:**
1. Tạo 1 bảng riêng để lưu trữ measures
8. **DAX - NHỮNG HÀM DAX THÔNG DỤNG**
- **Aggregation functions:**
SUM/SUMX, AVERAGE/AVERAGEX, COUNT, COUNTROWS, DISTINTCOUNT,MAX, MIN,..
- **Filter functions:**
CALCULATE, CALCULATETABLE, FILTER, LOOKUPVALUE, EARLIER,...
- **Date time functions:**
DATE, DAY, MONTH, YEAR, DATEDIFF, EOMONTH, CALENDAR, CALENDARAUTO,..
- **Time Intelligence functions:**
+ DATESMTD,DATESQTD, DATESYTD
+ PREVIOUSDAY, PREVIOUSMONTH, PREVIOUSYEAR, SAMEPERIODLASTYEAR,
+ TOTALMTD, TOTALQTD, TOTALYTD...
- **Text functions:** CONCATENATE, LEN, TRIM, UPPER, FIND, SEARCH, LEFT, RIGHT, MID...
- **Other common functions:** SWITCH, TRUE, AND, OR, HASONEFILTER, SELECTEDMEASURE
- **Use VAR/RETURN (Variables)**
**9. DAX - QUICK MEASURE**
- Year to date
- Filter
- Rolling Average
- Percentage Diff
**10. REPORT VISUALIZATION**
- Create KPI Score card
- Slicer synchronization across multiple pages
- Working with Selection and Book Marks pane
- Edit interaction - chỉnh sửa tương tác
11. **REPORT VISUALIZATION - CONDITIONAL FORMATTING**


- **Background color:**



- **Data bars:**


- **Icons:**


- **Font color:**


- **Dynamic chart title:**
***(1) Tạo measure:***

(2) Điều chỉnh tiêu đề:


**Kết quả:**


15. AI enhanced visualization
- What are AI visual?
- Key influencer visual
- Clustering using Scatter chart
16. Performance Analyzer
- What is Performance Analyzer?
- Start recording
- Understanding the results
- Drilling down into the visual
- Rename the visual using Selection Pane
- Analyze results to modify slicer
- Analyze results to refresh a particular visual
14. **WORKING WITH ROLE LEVEL SECURITY (RLS)**
- **Định nghĩa:**
+ Là chức năng quản trị và kiểm soát dữ liệu trong PBI dựa theo chính sách tiếp cận dữ liệu của người dùng trong công ty.
+ **Ví dụ:**
Báo cáo doanh số các cửa hàng trên toàn quốc -> mỗi cửa hàng chỉ xem được dữ liệu của cửa hàng đó.
- Cơ chế:
- Writing table filter with single field
- Writing table filter with multiple fields
- Viewing as roles
- Create dynamic RLS
- Create dynamic RLS according to
- Report line
- Assigning memeber to roles
- URL filtering
- Dynamic URL filtering
15. **POWER BI SERVICE - WORKSPACE APP**
- **Create a workspace:**


- **Assign permissions in workspace:**

- **Collaborating on shared report:**

***Roles in workspace:***

- **Share and manage report:**
+ Share only report:

A. **Share report:**
+ Share app
+ Share report only
B. **Manage access:**
+ Chỉ cấp quyền để xem báo cáo chỉ định
+ Cấp quyền cho user xem báo cáo và model
+ Cấp quyền cho user xem tất các báo cáo trong 1 workspace: tương tự các bước ở phần "Roles in workspace" -> add user và cấp roles là viewer.
**Visualizing data with reports:**
**3 Key quesions:**
***1. What "type of data" are you working with?***
(Time-series , financial, textual, categorical, survey, hierarchical, geospatial...)
***2. What do you want to "communicate"?***
+ Comparision: Column/bar chart, clustered column/bar, table/heatmap, line chart, area chart...
+ Composition: Stacked bar/column chart, pie/donut chart, stacked area, waterfall chart, funnel chart, tree map...
+ Distribution: histogram, density plot, scatter plot, box & whisker,...
+ Relationship: scatter plot, bubble chart, correlation matrix...
***3. Who is the "end user" and what do they need?***
**+ The analyst:**
* Requires:Likes to see details and understand exactly what's happening at a granular level
* Refers: Tables or combo chart ->> granular deyail to support root-cause analysis
**+ The manager:**
* Requires: Wants summarized data with clear, actionale insights to help operate the business.
* Refers: Common charts & graphs ->> Some detals, but only when it supports a specific insight.
**+ The executive:**
* Requires: Needs high-level, crystal clear KPIs to track business health and topline performace.
* Refers: KPI cards or simple charts ->> Minimal detal, unless it adds critical context to KPIs.
**DASHBOARD DESIGN FRAMEWORK:**
1. Define the purpose
2. Choose the right metrics
3. Present the data effectively
4. Eliminate clutter & noise
5. Use layout to focus attention
6. Tell as clear story
---------------------
**DATA CAREER OVERVIEW:**
