Power BI Course Tutorial for Beginners
Master Data Visualization and Business Intelligence!
4.4 Rating -
(Profile with 10,000+ Students)
Here’s a complete HR dataset for you in CSV format (with 300 rows), along with a list of business questions/problems you can solve using Power BI and the possible types of answers/insights you can generate.
Dataset Link: https://github.com/slidescope/data/blob/master/hr_employee_data_with_nationality.csv
✅ Dataset Description
Filename: hr_employee_data.csv
Rows: 300
Columns (Fields):
EmployeeID: Unique IDName: Full name (mock names)Department: Categorical (HR, Sales, IT, Finance, Marketing, R&D)Gender: Male, Female, OtherAge: Integer (20–60)Education: Bachelor’s, Master’s, PhD, DiplomaJobRole: Job roles like Analyst, Manager, Executive, Developer, etc.MonthlyIncome: Numerical (20,000–120,000)YearsAtCompany: Integer (0–40)Attrition: Yes, NoPerformanceRating: 1–5OverTime: Yes, NoMaritalStatus: Single, Married, DivorcedWorkLifeBalance: 1–4TrainingTimesLastYear: Integer (0–10)
📊 Business Questions & Power BI Use Cases
| Business Question | Visualization Type | Insights / Answers |
|---|---|---|
| 1. What is the overall attrition rate? | Card, KPI | E.g., 18% attrition |
| 2. Which departments have the highest attrition? | Bar Chart | E.g., Sales = 30%, IT = 12% |
| 3. Is there a trend between years at company and attrition? | Line or Scatter Chart | E.g., high attrition in employees < 3 years |
| 4. How does income vary by department? | Box Plot / Bar Chart | E.g., Finance highest average salary |
| 5. Do employees doing overtime show lower work-life balance? | Matrix / Stacked Bar | Overtime employees report WLB rating 1–2 mostly |
| 6. What’s the gender distribution by department? | Stacked Column / Donut | Identify imbalance |
| 7. Does performance rating correlate with attrition? | Clustered Bar | E.g., Rating 2 = high attrition |
| 8. Average training hours per department? | Bar Chart | E.g., R&D = 8 hrs, HR = 3 hrs |
| 9. What is the age group with highest attrition? | Histogram or Slicer Filter | E.g., Age 25–35 most at risk |
| 10. How does marital status affect attrition or income? | Pie/Bar Charts | E.g., Single employees show higher attrition |
Here are Power BI questions specifically suited for DAX, along with the appropriate DAX formulas, and explanations on when to use Calculated Measures, Columns, or Tables.
✅ When to Use What in DAX
| Type | Purpose |
|---|---|
| Calculated Column | Row-by-row computation; added to the data model table directly. |
| Measure | Aggregation or computation done during analysis; not stored per row. |
| Calculated Table | Creates a new table based on existing data; used for summaries, filtering, relationships, etc. |
📌 DAX Questions, Formulas, and When to Use
1. What is the attrition rate?
Question Type: KPI
Use: Measure
Attrition Rate =
DIVIDE(
CALCULATE(COUNTROWS(EmployeeData), EmployeeData[Attrition] = "Yes"),
COUNTROWS(EmployeeData)
)
✅ Use Measure here because it’s an aggregated value (depends on filters, slicers, etc.)
2. Add a column to group employees into Age Bands (e.g., 20-30, 31-40)
Question Type: Segmentation
Use: Calculated Column
Age Band =
SWITCH(TRUE(),
EmployeeData[Age] <= 30, "20-30",
EmployeeData[Age] <= 40, "31-40",
EmployeeData[Age] <= 50, "41-50",
"51+"
)
✅ Use Column because you want to create a static attribute per row (for use in slicers/grouping).
3. What is the average income per department?
Question Type: Bar chart (by department)
Use: Measure
Avg Income = AVERAGE(EmployeeData[MonthlyIncome])
✅ Use Measure for aggregation—it reacts to the department filter.
4. Create a new table that lists only employees with attrition = Yes
Question Type: Filtered table
Use: Calculated Table
Attrited Employees =
FILTER(EmployeeData, EmployeeData[Attrition] = "Yes")
✅ Use Table for generating filtered subsets used in reports, relationships, etc.
5. Add a column to show Tenure Category (New, Mid, Experienced)
Use: Calculated Column
Tenure Category =
SWITCH(TRUE(),
EmployeeData[YearsAtCompany] <= 2, "New",
EmployeeData[YearsAtCompany] <= 5, "Mid",
"Experienced"
)
✅ Use Column for row-level classification.
6. Calculate total overtime employees
Use: Measure
Total Overtime =
CALCULATE(
COUNTROWS(EmployeeData),
EmployeeData[OverTime] = "Yes"
)
✅ Use Measure—aggregates and updates with filters.
7. What % of employees with poor Work-Life Balance (1 or 2) also do overtime?
Use: Measure
Poor WLB Overtime % =
DIVIDE(
CALCULATE(COUNTROWS(EmployeeData),
EmployeeData[WorkLifeBalance] <= 2,
EmployeeData[OverTime] = "Yes"),
CALCULATE(COUNTROWS(EmployeeData), EmployeeData[WorkLifeBalance] <= 2)
)
✅ Measure, because it’s a filtered ratio calculation.
8. Rank employees by income within their department
Use: Calculated Column (for display), or Measure (for dynamic ranking)
As Column:
Income Rank =
RANKX(
FILTER(EmployeeData, EmployeeData[Department] = EARLIER(EmployeeData[Department])),
EmployeeData[MonthlyIncome],
,
DESC,
Dense
)
✅ Use Column if you want a static rank shown in the table.
9. Count employees per age band with high performance (rating ≥ 4)
Use: Measure
High Performers by Age Band =
CALCULATE(
COUNTROWS(EmployeeData),
EmployeeData[PerformanceRating] >= 4
)
✅ Use Measure so it updates dynamically with the age band filter.
10. Create a summary table: Department vs Avg. Income & Avg. Tenure
Use: Calculated Table
Dept Summary =
SUMMARIZE(
EmployeeData,
EmployeeData[Department],
"Avg Income", AVERAGE(EmployeeData[MonthlyIncome]),
"Avg Tenure", AVERAGE(EmployeeData[YearsAtCompany])
)
✅ Calculated Table for static summary reporting or advanced relationships.
