Master Power BI From Scratch

Learn Power BI fundamentals, data sources, data transformation, data modeling, DAX, visualizations, reports, and dashboards through structured practical lessons.

COURSE SYLLABUS
1. Power BI Introduction
Introduction to Power BI Power BI Desktop and Service Power BI Workflow Power BI Terminology Power BI Workspace Overview
2. Power BI Installation and Interface
Power BI Installation Power BI Desktop Interface Report, Data and Model Views Power BI File Management Power BI Settings and Options
3. Power BI Data Sources
Excel and CSV Data Sources Text and Folder Data Sources Database Data Sources Web and Online Data Sources Data Source Credentials and Refresh
4. Power BI Data Transformation
Power Query Introduction Data Types and Column Operations Merge and Append Queries Split, Group and Pivot Columns Power Query Applied Steps
5. Power BI Data Cleaning
Missing and Null Values Remove Duplicates and Errors Text and Date Cleaning Replace and Fill Values Data Quality Validation
6. Power BI Data Modeling
Data Modeling Fundamentals Create Table Relationships Cardinality and Filter Direction Star Schema and Dimension Tables Date Tables and Model Optimization
7. DAX
DAX Introduction and Syntax DAX Aggregation Functions DAX Logical and Conditional Functions DAX Filter and Iterator Functions DAX Date and Time Intelligence
8. Power BI Calculations
Calculated Columns Measures and Implicit Measures Row Context and Filter Context Quick Measures and KPI Time-Based Business Calculations
9. Power BI Visualizations
Basic Power BI Charts Pie, Donut and Treemap Charts Cards, Tables and Matrices Maps and Geographic Visuals Advanced and Custom Visuals
10. Power BI Filters and Slicers
Filter Types and Filter Pane Slicers and Sync Slicers Drill Down and Drill Through Cross-Filtering and Highlighting Bookmarks and Buttons
11. Power BI Reports and Dashboards
Report Page Layout and Design Multi-Page Reports Dashboard Creation and Tiles Executive and Business Reports Report Usability and Accessibility
12. Power BI Formatting and Interactivity
Themes and Color Formatting Conditional Formatting Tooltips and Report Page Tooltips Visual Interactions and Edit Interactions Mobile Layout and Responsive Reports
13. Power BI Publishing and Sharing
Publish Reports to Service Workspaces and Apps Scheduled Refresh and Gateway Sharing and Permissions Row-Level Security and Deployment
14. Power BI Projects and Assessment
Sales Dashboard Project Student Performance Project Data Cleaning and Modeling Assignment DAX and Visualization Assessment Final Power BI Project and Assessment

Measures and Implicit Measures

Measures are DAX calculations used to summarize data dynamically. They are essential for calculating total sales, profit, average order value, percentages, and key performance indicators in Power BI reports.

Power BI also provides implicit measures when you add suitable numeric columns to a visual and select an aggregation such as Sum, Average, Minimum, or Maximum. Understanding the difference helps you create flexible and maintainable reports.

Learning Objectives

  • Understand explicit and implicit measures.
  • Create measures using DAX.
  • Use SUM, AVERAGE, DIVIDE, and other functions inside measures.
  • Understand how filter context affects measure results.
  • Format measures for currency, percentages, and whole numbers.
  • Choose the appropriate calculation for a report visual.

1. What Is a Measure?

A measure is a calculation evaluated when it is used in a visual or query. Its result depends on the current filter context, including report slicers, visual fields, page filters, and relationships in the model.

For example, a Total Sales measure can display the overall sales amount in a Card visual. When a user selects a particular product, the same measure can show sales for that product.

How Measures Work Report Filters Product, Date, Region DAX Measure Total Sales Updated Result Filtered sales total The measure recalculates for the current context.

2. What Is an Explicit Measure?

An explicit measure is created by writing a DAX formula using the New measure command. It can be reused across multiple visuals and provides control over the calculation and formatting.

Example: Total Sales

Total Sales =
SUM(Sales[SalesAmount])

Example: Total Quantity

Total Quantity =
SUM(Sales[Quantity])

Example: Average Sales

Average Sales =
AVERAGE(Sales[SalesAmount])
Best Practice: Give measures meaningful names such as Total Sales, Total Profit, and Profit Margin. Clear names make reports easier to understand and maintain.

3. What Is an Implicit Measure?

An implicit measure is generated by Power BI when a user adds an aggregatable column to a visual and selects an aggregation. For example, a numeric SalesAmount column may be summarized by Sum or Average.

  1. Add a numeric column such as SalesAmount to a visual.
  2. Open its field menu in the visual's Build pane.
  3. Select Sum, Average, Minimum, Maximum, or another available aggregation.
  4. Power BI applies that aggregation to the visual.
Implicit Aggregation Workflow Numeric Column SalesAmount Add to a visual Aggregation Sum or Average Choose from the menu Visual Result Aggregated value Based on context The aggregation is configured within the visual.

4. Explicit Measures vs. Implicit Measures

Feature Explicit Measure Implicit Measure
Creation Created with a DAX formula. Generated by selecting an aggregation for a column in a visual.
Reuse Can be reused across multiple visuals. Aggregation is configured in the visual.
Complex logic Supports custom DAX expressions. Generally suited to built-in aggregations.
Naming Can be given a meaningful measure name. Uses the column and aggregation label in the visual.
Best use Reusable business calculations and KPIs. Quick summaries during visual creation.

5. Create a Total Sales Measure

Suppose your Sales table has a numeric column named SalesAmount. Create an explicit measure as follows.

Total Sales =
SUM(Sales[SalesAmount])

To create this measure:

  1. Select the Sales table in the Data or Fields pane.
  2. Select New measure from the ribbon or the table's context menu.
  3. Enter the formula in the formula bar.
  4. Press Enter.
  5. Add Total Sales to a Card visual.

6. Create a Profit Measure

If SalesAmount represents revenue and CostAmount represents total cost for each sales record, create the following measures.

Total Cost =
SUM(Sales[CostAmount])
Total Profit =
[Total Sales] - [Total Cost]

The Total Profit measure subtracts total cost from total sales in the current filter context.

Important: These examples assume that CostAmount is already the total cost for each record. If your model stores cost per unit instead, calculate the total cost appropriately before calculating profit.

7. Create a Profit Margin Measure

Profit margin measures the proportion of revenue retained as profit. Use DIVIDE to handle cases where total sales are zero or blank.

Profit Margin =
DIVIDE(
    [Total Profit],
    [Total Sales],
    0
)

Select the Profit Margin measure and set its format to Percentage. You can choose the number of decimal places in the measure formatting options.

8. Understand Filter Context

A measure responds to the context in which it is evaluated. A Card visual may display total sales for all selected records, while a table visual may display sales separately for each product.

Sales for Electronics =
CALCULATE(
    [Total Sales],
    Sales[Category] = "Electronics"
)

This example assumes the Sales table contains a Category column. CALCULATE applies the Electronics condition when evaluating Total Sales.

One Measure, Different Contexts Card Visual Overall Total Sales Current report filters Table Visual Sales by Product Product filter context Slicer Selection Filtered Total Sales Selected category The same measure can produce different results across visuals.

9. Common Aggregations in Power BI

Aggregation Purpose Example Question
Sum Adds numeric values. What are the total sales?
Average Calculates the arithmetic mean. What is the average sales amount?
Minimum Returns the smallest value. What is the lowest order value?
Maximum Returns the largest value. What is the highest sales amount?
Count Counts values according to the selected aggregation. How many nonblank values are present?
Count distinct Counts unique values in a column. How many unique customers purchased products?

10. Format Measures Correctly

Correct formatting helps users interpret results without confusion. Select a measure in the model and choose an appropriate format.

  • Total Sales: Currency or decimal number.
  • Total Quantity: Whole number.
  • Profit Margin: Percentage.
  • Average Sales: Currency or decimal number.
  • Customer Count: Whole number.
Best Practice: Keep the business meaning and unit consistent. Avoid formatting a percentage measure as currency or displaying currency values with unnecessary decimal places.

11. Student Practice Tasks

Task 1: Create an explicit measure named Total Sales.

Task 2: Create Total Quantity and Average Sales measures.

Task 3: Create Total Cost and Total Profit measures.

Task 4: Create a Profit Margin measure using DIVIDE.

Task 5: Add SalesAmount to a visual and test the available implicit aggregations.

Task 6: Display Total Sales in a Card visual and Sales by Product in a table.

Task 7: Add a Category slicer and observe how the measures respond.

Task 8: Format each measure using the correct number format.

12. Knowledge Check

Question 1: What is an explicit measure?

Answer: A reusable calculation created by writing a DAX formula.

Question 2: What is an implicit measure?

Answer: An aggregation applied to a column within a visual.

Question 3: Which function can safely divide two measure results?

Answer: DIVIDE().

Question 4: Why can a measure return different values in different visuals?

Answer: Because the filter context may differ between the visuals.

Question 5: Which format is appropriate for Profit Margin?

Answer: Percentage.

Summary

In this lesson, you learned how explicit measures use DAX formulas to calculate reusable business metrics and how implicit measures provide quick aggregations directly within report visuals.

You practised creating Total Sales, Total Cost, Total Profit, and Profit Margin measures. You also learned how filter context affects measure results and why correct formatting is important. Use explicit measures for reusable business logic and verify every calculation against the data model before publishing a report.