πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-600 Domain 2
Domain 2 β€” Module 14 of 14 100%
21 of 29 overall

DP-600 Study Guide

Domain 1: Maintain a Data Analytics Solution

  • Workspace Access Controls
  • Row-Level & Object-Level Security
  • Sensitivity Labels & Endorsement
  • Git Version Control in Fabric
  • Deployment Pipelines: Dev β†’ Test β†’ Prod
  • Impact Analysis & Dependencies
  • XMLA Endpoint & Reusable Assets

Domain 2: Prepare Data

  • Microsoft Fabric: The Big Picture Free
  • Lakehouses: Your Data Foundation Free
  • Warehouses in Fabric Free
  • Choosing the Right Data Store Free
  • Data Connections & OneLake Catalog
  • Shortcuts & OneLake Integration
  • Ingesting Data: Dataflows Gen2 & Pipelines
  • Star Schema Design Free
  • SQL Objects: Views, Functions & Stored Procedures
  • Transforming Data: Reshape & Enrich
  • Data Quality & Cleansing
  • Querying with SQL
  • Querying with KQL
  • Querying with DAX

Domain 3: Implement and Manage Semantic Models

  • Semantic Models: Storage Modes
  • Relationships & Advanced Modeling
  • DAX Essentials: Variables & Functions
  • Calculation Groups & Field Parameters
  • Large Models & Composite Models
  • Direct Lake Mode
  • DAX Performance Optimization
  • Incremental Refresh

DP-600 Study Guide

Domain 1: Maintain a Data Analytics Solution

  • Workspace Access Controls
  • Row-Level & Object-Level Security
  • Sensitivity Labels & Endorsement
  • Git Version Control in Fabric
  • Deployment Pipelines: Dev β†’ Test β†’ Prod
  • Impact Analysis & Dependencies
  • XMLA Endpoint & Reusable Assets

Domain 2: Prepare Data

  • Microsoft Fabric: The Big Picture Free
  • Lakehouses: Your Data Foundation Free
  • Warehouses in Fabric Free
  • Choosing the Right Data Store Free
  • Data Connections & OneLake Catalog
  • Shortcuts & OneLake Integration
  • Ingesting Data: Dataflows Gen2 & Pipelines
  • Star Schema Design Free
  • SQL Objects: Views, Functions & Stored Procedures
  • Transforming Data: Reshape & Enrich
  • Data Quality & Cleansing
  • Querying with SQL
  • Querying with KQL
  • Querying with DAX

Domain 3: Implement and Manage Semantic Models

  • Semantic Models: Storage Modes
  • Relationships & Advanced Modeling
  • DAX Essentials: Variables & Functions
  • Calculation Groups & Field Parameters
  • Large Models & Composite Models
  • Direct Lake Mode
  • DAX Performance Optimization
  • Incremental Refresh
Domain 2: Prepare Data Premium ⏱ ~13 min read

Querying with DAX

Use DAX as a query language β€” EVALUATE, SUMMARIZECOLUMNS, and CALCULATETABLE. Query semantic models, inspect measure results, and understand DAX evaluation context.

DAX as a query language

β˜• Simple explanation

Think of DAX queries like asking a smart assistant very specific questions.

You already know DAX creates measures in Power BI (like SUM, AVERAGE, CALCULATE). But DAX can also be used as a query language β€” you write a query, it returns a table of results, like SQL does.

Why would you use DAX queries instead of SQL? Because DAX queries evaluate inside the semantic model β€” they use the relationships, measures, and business logic you have already defined. SQL queries hit the raw tables and know nothing about your model.

DAX (Data Analysis Expressions) is primarily known as a formula language for measures and calculated columns in Power BI semantic models. However, DAX also functions as a query language through the EVALUATE statement, which returns tabular results. DAX queries can be executed in DAX Studio, SSMS (via XMLA endpoint), Power BI Performance Analyzer, and Fabric notebooks.

The key advantage of DAX queries over SQL: DAX queries evaluate within the semantic model context, meaning they respect relationships, measures, calculation groups, and security filters (RLS). SQL queries hit the underlying storage and bypass semantic model logic.

The EVALUATE statement

Every DAX query begins with EVALUATE followed by a table expression:

// Simple: return the entire Products table
EVALUATE Products

// With columns: return specific columns
EVALUATE
SELECTCOLUMNS(
    Products,
    "Product Name", Products[ProductName],
    "Category", Products[Category],
    "Unit Price", Products[UnitPrice]
)

EVALUATE with filtering

// Filter to products in the "Fresh Produce" category
EVALUATE
FILTER(
    Products,
    Products[Category] = "Fresh Produce"
)

EVALUATE with aggregation

// Total revenue by region β€” using SUMMARIZECOLUMNS
EVALUATE
SUMMARIZECOLUMNS(
    Stores[Region],
    "Total Revenue", [Total Revenue],
    "Transaction Count", [Transaction Count]
)

What’s happening: SUMMARIZECOLUMNS groups by Stores[Region] and evaluates the [Total Revenue] and [Transaction Count] measures for each group. The measures use the semantic model’s relationships β€” no explicit JOINs needed.

Key DAX query functions

FunctionWhat It DoesExample
EVALUATEReturns a table (required to start a DAX query)EVALUATE Sales
SUMMARIZECOLUMNSGroup by columns and evaluate measuresRevenue by region
CALCULATETABLEReturn a filtered tableSales where amount > 1000
SELECTCOLUMNSChoose specific columns from a tableProject name and price only
FILTERRow-by-row filter on a tableProducts where price > 50
TOPNReturn top N rowsTop 10 products by revenue
ORDER BYSort the EVALUATE resultSort by revenue descending

Complete query example

// Top 10 stores by revenue in Q1 2026
DEFINE
    MEASURE Sales[Q1 Revenue] =
        CALCULATE(
            [Total Revenue],
            Dates[Quarter] = "Q1",
            Dates[Year] = 2026
        )
EVALUATE
TOPN(
    10,
    ADDCOLUMNS(
        VALUES(Stores[StoreName]),
        "Q1 Revenue", [Q1 Revenue]
    ),
    [Q1 Revenue], DESC
)
ORDER BY [Q1 Revenue] DESC

What’s happening line by line:

  1. DEFINE β€” create a temporary measure scoped to this query
  2. MEASURE β€” calculate revenue filtered to Q1 2026
  3. EVALUATE β€” begin the result table
  4. TOPN β€” return only the top 10 rows
  5. ADDCOLUMNS β€” start with unique store names, add the Q1 Revenue column
  6. ORDER BY β€” sort the result
πŸ’‘ Exam tip: DEFINE vs model measures

The DEFINE block lets you create temporary measures that exist only for the duration of the query. This is useful for:

  • Testing measure logic before adding it to the model
  • Creating complex calculations without modifying the semantic model
  • Debugging β€” isolate a measure and evaluate it step by step

DEFINE measures override model measures with the same name (within the query only).

Where to run DAX queries

ToolUse Case
DAX StudioThe gold standard for DAX query development and performance tuning
SSMS / Azure Data StudioConnect via XMLA endpoint to query semantic models
DAX Query ViewBuilt into Power BI Desktop β€” author and run DAX queries directly
Power BI Performance AnalyzerCaptures DAX queries generated by report visuals (for analysis, not authoring)
Fabric NotebookExecute DAX queries programmatically using the semantic link library
πŸ’‘ Scenario: Anita debugs a revenue measure

Anita at FreshCart notices that her Power BI dashboard shows unexpected revenue numbers for the β€œMetro” store type. She opens DAX Studio and runs:

EVALUATE
CALCULATETABLE(
    SUMMARIZECOLUMNS(
        Stores[StoreName],
        Stores[StoreType],
        "Revenue", [Total Revenue]
    ),
    Stores[StoreType] = "Metro"
)

The query returns revenue for each Metro store, letting her compare against known values. She discovers that one store has a duplicated entry in the dimension table, causing double-counted revenue. The issue is in the data, not the measure.

DAX vs SQL: When to use which

DAX queries work inside the semantic model; SQL queries work against raw storage
FactorDAX QueriesSQL Queries
Evaluates againstSemantic model (relationships, measures, RLS)Raw storage tables (lakehouse/warehouse)
JoinsAutomatic β€” uses model relationshipsManual β€” explicit JOIN clauses
Best forTesting measures, debugging reports, model-aware analysisData preparation, ETL, ad-hoc exploration
Performance tuningDAX Studio profiling, query plansSQL execution plans, indexing
Write capabilityRead-only (queries only, no DML)Full DML in warehouses
Question

What does the EVALUATE statement do in DAX?

Click or press Enter to reveal answer

Answer

EVALUATE is the entry point for a DAX query β€” it returns a table of results. Every DAX query must start with EVALUATE followed by a table expression. Optionally preceded by DEFINE (temporary measures) and followed by ORDER BY.

Click to flip back

Question

What is the advantage of SUMMARIZECOLUMNS over SQL GROUP BY?

Click or press Enter to reveal answer

Answer

SUMMARIZECOLUMNS automatically uses the semantic model's relationships β€” no explicit JOINs needed. It also evaluates DAX measures, which may contain complex business logic (CALCULATE, time intelligence). SQL GROUP BY requires manual joins and cannot evaluate model measures.

Click to flip back

Question

What does the DEFINE block do in a DAX query?

Click or press Enter to reveal answer

Answer

DEFINE creates temporary measures or variables that exist only for the duration of the query. Useful for testing measure logic, creating one-off calculations, or debugging. DEFINE measures override model measures with the same name within the query scope.

Click to flip back

Knowledge Check

Anita at FreshCart wants to test a new 'Year-over-Year Growth' measure against her semantic model before adding it permanently. Which approach lets her test the measure without modifying the model?

Knowledge Check

An exam question asks: 'Which DAX function returns the top N rows from a table expression based on a specified column?' What is the answer?

🎬 Video coming soon


Next up: Semantic Models: Storage Modes β€” Import, DirectQuery, and Direct Lake: choose the right mode for your data.

← Previous

Querying with KQL

Next β†’

Semantic Models: Storage Modes

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.