🔒 Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided PL-300 Domain 2
Domain 2 — Module 5 of 7 71%
12 of 26 overall

PL-300 Study Guide

Domain 1: Prepare the Data

  • Connecting to Data Sources Free
  • Storage Modes: Import, DirectQuery & DirectLake Free
  • Data Profiling & Quality Free
  • Power Query Transforms Free
  • Combining Data: Merge, Append & Queries
  • Fact Tables, Dimension Tables & Keys
  • Data Loading & Query Optimisation

Domain 2: Model the Data

  • Star Schema & Relationships
  • Date Tables & Table Properties
  • Columns vs Measures: When to Use Which
  • DAX Fundamentals Free
  • CALCULATE & Filter Context
  • Time Intelligence & Calculation Groups
  • Model Performance Optimisation

Domain 3: Visualize and Analyze the Data

  • Choosing & Formatting Visuals
  • Slicers, Filters & Interactions
  • Bookmarks, Tooltips & Navigation
  • Copilot in Power BI Reports
  • Report Pages & Paginated Reports
  • Mobile, Accessibility & Personalisation
  • AI Visuals & Pattern Discovery

Domain 4: Manage and Secure Power BI

  • Workspaces & Distribution
  • Dashboards, Alerts & Subscriptions
  • Gateways & Scheduled Refresh
  • Row-Level Security & Access Control
  • Sensitivity Labels & Governance

PL-300 Study Guide

Domain 1: Prepare the Data

  • Connecting to Data Sources Free
  • Storage Modes: Import, DirectQuery & DirectLake Free
  • Data Profiling & Quality Free
  • Power Query Transforms Free
  • Combining Data: Merge, Append & Queries
  • Fact Tables, Dimension Tables & Keys
  • Data Loading & Query Optimisation

Domain 2: Model the Data

  • Star Schema & Relationships
  • Date Tables & Table Properties
  • Columns vs Measures: When to Use Which
  • DAX Fundamentals Free
  • CALCULATE & Filter Context
  • Time Intelligence & Calculation Groups
  • Model Performance Optimisation

Domain 3: Visualize and Analyze the Data

  • Choosing & Formatting Visuals
  • Slicers, Filters & Interactions
  • Bookmarks, Tooltips & Navigation
  • Copilot in Power BI Reports
  • Report Pages & Paginated Reports
  • Mobile, Accessibility & Personalisation
  • AI Visuals & Pattern Discovery

Domain 4: Manage and Secure Power BI

  • Workspaces & Distribution
  • Dashboards, Alerts & Subscriptions
  • Gateways & Scheduled Refresh
  • Row-Level Security & Access Control
  • Sensitivity Labels & Governance
Domain 2: Model the Data Premium ⏱ ~14 min read

CALCULATE & Filter Context

Master the CALCULATE function — the most powerful and most tested DAX function on the PL-300 exam. Understand how it modifies filter context and works with ALL, REMOVEFILTERS, and KEEPFILTERS.

The most important DAX function

☕ Simple explanation

Think of CALCULATE as a pair of tinted glasses.

Normally, you see the whole room (all data). Put on blue-tinted glasses and everything looks blue (filtered to one category). CALCULATE puts these glasses on your measure — it changes what data the measure “sees” before doing its calculation.

CALCULATE(SUM(Sales[Revenue]), Products[Category] = “Fruit”) says: “Sum the revenue, BUT only look at fruit sales.” Even if the user hasn’t filtered to Fruit, this measure always shows fruit revenue.

CALCULATE can also REMOVE filters — like taking glasses off to see everything again, even when a slicer is active.

CALCULATE evaluates an expression in a modified filter context. It takes an expression (the measure to evaluate) and one or more filter arguments that override, add to, or remove existing filters.

Syntax: CALCULATE(expression, filter1, filter2, …)

Each filter argument modifies the filter context BEFORE the expression is evaluated. Filters can add new filters, replace existing filters on the same column, or remove filters using ALL/REMOVEFILTERS. Understanding this modification behaviour is critical for the PL-300 exam.

CALCULATE basics

Riley at Coastal Fresh (🛒) needs measures that always show specific slices, regardless of user filters:

Fruit Revenue = 
CALCULATE(
    SUM(Sales[Revenue]),
    Products[Category] = "Fruit"
)

This measure ALWAYS shows fruit revenue — even if the user selects “Dairy” on a slicer.

North Region Revenue = 
CALCULATE(
    SUM(Sales[Revenue]),
    Stores[Region] = "North"
)

How it works:

  1. CALCULATE takes the current filter context (whatever slicers/filters are active)
  2. It ADDS the filter Products[Category] = "Fruit"
  3. If there’s already a filter on Category, it REPLACES it
  4. Then it evaluates SUM(Sales[Revenue]) in this modified context

Removing filters with ALL

ALL removes filters from a table or column. Combined with CALCULATE, it lets you ignore specific filters.

Revenue % of Total = 
VAR CurrentRevenue = SUM(Sales[Revenue])
VAR AllRevenue = CALCULATE(SUM(Sales[Revenue]), REMOVEFILTERS())
RETURN
    DIVIDE(CurrentRevenue, AllRevenue)
RegionRevenueRevenue % of Total
North$50K42%
South$30K25%
East$25K21%
West$15K12%
Total$120K100%

REMOVEFILTERS() (with no arguments) removes ALL filters from the entire model, so AllRevenue always returns the grand total of $120K regardless of any active filters. You can also target specific tables or columns: REMOVEFILTERS(Stores) removes only the store filter.

ALL vs REMOVEFILTERS vs ALLEXCEPT

ALL and REMOVEFILTERS remove filters; ALLEXCEPT keeps specific ones; KEEPFILTERS intersects
FunctionWhat It DoesUse When
ALL(table)Removes all filters from the entire tableYou need the grand total, ignoring all filters on that table
ALL(column)Removes filters from a specific column onlyYou want to ignore one filter but keep others
REMOVEFILTERS()Same as ALL but clearer intent — removes filtersMicrosoft's recommended replacement for ALL as a filter remover
ALLEXCEPT(table, column)Removes all filters EXCEPT on specified columnsYou want to keep one filter active and remove everything else
KEEPFILTERS()Adds a filter that intersects with existing filters instead of replacingYou want to narrow down, not override the current filter

Practical examples

Nadia at Prism Agency (📊) needs campaign metrics that compare against totals:

// Revenue share within each platform (ignores platform filter)
Platform Share = 
DIVIDE(
    SUM(Campaigns[Revenue]),
    CALCULATE(SUM(Campaigns[Revenue]), ALL(Campaigns[Platform]))
)
// Revenue keeping the platform filter but ignoring the campaign filter
Platform Total = 
CALCULATE(
    SUM(Campaigns[Revenue]),
    ALLEXCEPT(Campaigns, Campaigns[Platform])
)
💡 Exam tip: CALCULATE filter replacement

This is the #1 CALCULATE trap on the exam. When CALCULATE has a filter on a column that’s already filtered by a slicer:

CALCULATE replaces the existing filter — it doesn’t intersect.

Example: A slicer selects “North” region. The measure CALCULATE(SUM(Revenue), Region = "South") returns South revenue, NOT zero. CALCULATE replaced the “North” filter with “South”.

To intersect (show only if BOTH conditions are true), use KEEPFILTERS: CALCULATE(SUM(Revenue), KEEPFILTERS(Region = "South")) — returns zero because North AND South can’t both be true.

CALCULATE with multiple filters

You can stack multiple filter arguments — they all apply simultaneously:

North Fruit Revenue = 
CALCULATE(
    SUM(Sales[Revenue]),
    Stores[Region] = "North",
    Products[Category] = "Fruit"
)

This is equivalent to “SUM revenue WHERE Region = North AND Category = Fruit”.

Dr. Ethan at Bayview Medical (🏥) uses CALCULATE for compliance metrics:

Emergency After Hours = 
CALCULATE(
    COUNTROWS(Appointments),
    Appointments[Type] = "Emergency",
    'Date'[IsBusinessHours] = FALSE
)

Context transition

When CALCULATE is used inside an iterator function (SUMX, AVERAGEX, etc.) or a calculated column, it triggers context transition — converting the current row context into filter context.

This is an advanced concept tested on the exam:

// In a calculated column on the Products table:
Product Revenue = CALCULATE(SUM(Sales[Revenue]))

Without CALCULATE, SUM(Sales[Revenue]) in a calculated column would return the grand total for every row (no filter context). With CALCULATE, context transition converts the row context (current product) into a filter — so each product gets its own revenue total.

Knowledge check

Question

What does CALCULATE do?

Click or press Enter to reveal answer

Answer

Evaluates a DAX expression in a modified filter context. It can add, replace, or remove filters before evaluating the expression.

Click to flip back

Question

What's the difference between ALL and ALLEXCEPT?

Click or press Enter to reveal answer

Answer

ALL(table) removes ALL filters from a table. ALLEXCEPT(table, column1, column2) removes all filters EXCEPT on the specified columns.

Click to flip back

Question

What does KEEPFILTERS do inside CALCULATE?

Click or press Enter to reveal answer

Answer

Instead of replacing the existing filter on a column, KEEPFILTERS intersects with it. The result only includes values that satisfy BOTH the existing filter and the KEEPFILTERS condition.

Click to flip back

Knowledge Check

A slicer is set to Region = 'North'. Riley's measure is: CALCULATE(SUM(Sales[Revenue]), Stores[Region] = "South"). What does it return?

Knowledge Check

Nadia needs each campaign's revenue as a percentage of the platform total (e.g., Google Ads total). Which measure is correct?

🎬 Video coming soon

Next up: Time Intelligence and Calculation Groups — year-to-date, year-over-year, and other time-based calculations.

← Previous

DAX Fundamentals

Next →

Time Intelligence & Calculation Groups

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.