big-data5 min read

Power BI Tutorial: Learn Business Analytics from Scratch (2026)

Power BI Tutorial: Learn Business Analytics from Scratch (2026)

Published:  |  Category: Big Data  |  Reading time: ~15 min
Power BI Tutorial: Learn Business Analytics from Scratch (2026)

Power BI is Microsoft answer to self-service analytics, and its integration with the Microsoft ecosystem makes it the default choice for organizations already on Office 365. What sets Power BI apart is Power Query for data transformation and DAX for calculated logic — both of which carry over from Excel and Power Pivot. Beneath the familiar surface lies a columnar engine (VertiPaq) that can handle hundreds of millions of rows.

In this tutorial I cover the end-to-end workflow: connecting to sources, shaping data in Power Query, building the data model with relationships, and writing DAX measures.

Power Query: Data Transformation at the Source

Power Query (M language) is where raw data becomes analysis-ready. Every click in the UI generates M code, which you can edit in the Advanced Editor for complex logic. The most common transformations I use are: unpivot columns, merge queries, and conditional columns. Applied steps are lazily evaluated until loaded into the data model.

I strongly recommend moving data preparation upstream whenever possible. Power Query runs on your local machine, so heavy transformations on large datasets will slow down refresh times.

let
    Source = Sql.Database("server", "warehouse"),
    Sales = Source{[Schema="dbo",Item="Sales"]}[Data],
    FilteredRows = Table.SelectRows(Sales, each [SaleDate] >= #date(2024,1,1)),
    Grouped = Table.Group(FilteredRows, {"Region"}, {{"Total", each List.Sum([Amount]), type number}})
in
    Grouped

DAX Fundamentals: Calculated Columns vs Measures

DAX (Data Analysis Expressions) is the formula language of Power BI. The single most important concept is the difference between calculated columns (evaluated row-by-row at refresh time, stored in memory) and measures (evaluated at query time based on filter context). A calculated column adds physical storage; a measure is a dynamic formula that respects slicers and filters.

The VertiPaq columnar storage engine compresses data aggressively, but calculated columns defeat this compression. I rarely use calculated columns — I push row-level logic into Power Query and write measures for aggregations.

-- Calculated column:
Profit = Sales[Revenue] - Sales[Cost]

-- Measure:
Total Profit = SUM(Sales[Revenue]) - SUM(Sales[Cost])

-- Time intelligence:
Sales PY = CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR('Date'[Date]))

Star Schema and Relationship Modeling

A well-modeled data source is the foundation of a fast Power BI report. The star schema consists of fact tables (transactions) at the center linked to dimension tables on the sides. Filter context flows from dimensions to facts. Snowflake schemas add query complexity without benefit in Power BI — flatten them during data preparation.

The date dimension is non-negotiable for time intelligence. List.Dates in Power Query generates every day in your date range with columns for year, quarter, month, week.

-- Date dimension (M):
let
    StartDate = #date(2020,1,1),
    EndDate = #date(2030,12,31),
    DateList = List.Dates(StartDate, Duration.Days(EndDate-StartDate)+1, #duration(1,0,0,0)),
    TableFromList = Table.FromList(DateList, Splitter.SplitByNothing()),
    DateTable = Table.RenameColumns(TableFromList,{"Column1","Date"})
in
    DateTable

Measures, KPIs, and Filter Context

DAX measures are executed within a filter context — the set of filters currently applied by slicers, row/column labels, and cross-filtering. CALCULATE is the most powerful DAX function because it modifies filter context. CALCULATE(SUM(Sales[Amount]), Product[Category] = "Electronics") overrides the current filter context.

KPIs in Power BI are measures that track a value against a target. The visual KPI component shows value, goal, and status in one compact element.

-- Sales vs Budget:
Sales Actual = SUM(Sales[Amount])
Sales Budget = SUM(Budget[Amount])
Variance = [Sales Actual] - [Sales Budget]
Variance % = DIVIDE([Variance], [Sales Budget], 0)

KPI Status = SWITCH(TRUE(),
    [Variance %] >= 0.05, "Green",
    [Variance %] >= -0.05, "Yellow",
    "Red")

Row-Level Security and Workspace Management

Row-Level Security (RLS) restricts data access at the row level based on the user identity. Define roles in Power BI Desktop with DAX filters like [SalesRep] = USERNAME(), then assign users to roles after publishing. RLS is evaluated on the service side.

Workspaces organize content. I recommend one workspace per business domain (Finance, Sales, Operations), with datasets, reports, and dashboards in the same workspace.

-- RLS role filter:
[SalesRep] = USERPRINCIPALNAME()

-- RLS for regional managers:
[Region] IN LOOKUPVALUES('UserRegion'[Region], 'UserRegion'[Email], USERPRINCIPALNAME())

Power BI Service, Gateways, and Scheduled Refresh

The Power BI service is where reports are shared, scheduled for refresh, and consumed on mobile. An on-premises data gateway is required when the Desktop file connects to a data source inside a corporate network. The gateway acts as a bridge between the service and on-premises data.

Scheduled refresh ensures the dataset stays current. Pro license allows 8 daily refreshes; Premium allows 48.

-- Incremental refresh (M):
// RangeStart = #datetime(2024,1,1)
// RangeEnd = #datetime(2025,1,1)
let
    Source = Sql.Database("server", "SalesDB"),
    SalesQuery = Source{[Schema="dbo",Item="Sales"]}[Data],
    FilteredRows = Table.SelectRows(SalesQuery, each [OrderDate] >= RangeStart and [OrderDate] < RangeEnd)
in
    FilteredRows

Frequently Asked Questions

What is the difference between Power BI Desktop and Power BI Service?

Desktop is the free authoring tool for building reports. Service is the cloud platform for sharing, refreshing, and consuming reports.

How does VertiPaq store compressed data?

VertiPaq uses columnar storage with value encoding for numbers and hash encoding for strings. Each unique value is stored once and referenced by index.

Can I use Power BI with non-Microsoft databases?

Yes. Power BI Desktop has native connectors for Snowflake, Google BigQuery, PostgreSQL, MySQL, and many others.

What is the difference between calculated column and measure in DAX?

A calculated column is computed row by row during refresh and stored physically. A measure is computed at query time based on filter context and is not stored.

Originally published on Ayodhyyya. Last updated June 1, 2026.