Beginning DAX with Power BI book cover by Philip Seamark, featuring abstract data and formula imagery on a clean technical background

Pages

262

Published

2018

Beginning DAX with Power BI

A Practical Introduction to DAX Formulas for Power BI Reports and Models

Learn to write DAX formulas that turn raw Power BI data into meaningful, trustworthy business insights — from your first measure to time-intelligence calculations.

DAX looks simple until your first measure returns the wrong number and you have't got a clue why. Beginning DAX with Power BI by Philip Seamark gives you a ground-up understanding of how DAX actually evaluates — filter context, row context, and the transition between them — so your formulas do what you intend, not what you typed. Practical examples drawn from real business scenarios let you apply each concept the moment you learn it.

About this book

Most Power BI users can drag fields into a visual. Far fewer can write a measure that answers a genuinely hard business question — or debug one that quietly returns the wrong answer. DAX is the layer where raw data becomes reliable insight, and learning it properly is the difference between a report that gets trusted and one that gets ignored.

Beginning DAX with Power BI by Philip Seamark — a Microsoft MVP with deep hands-on experience building production Power BI solutions — starts where most DAX resources skip over: how DAX actually thinks. Before writing a single formula, you build a clear mental model of tables, relationships, and the two evaluation contexts that control every result. That foundation is what separates developers who get DAX from developers who just copy formulas off Stack Overflow.

From there, each chapter layers on a concrete skill. You move from basic aggregations and calculated columns through to more demanding patterns: filtering with CALCULATE, working across related tables with RELATED and USERELATIONSHIP, and building time-intelligence calculations that handle month-to-date, year-over-year, and rolling-period analysis correctly — even when your calendar has gaps or non-standard periods.

The examples are drawn from realistic business data, not toy datasets. That means the problems feel familiar, the gotchas are the ones you will actually encounter, and the solutions translate directly to your own models. Every concept is tested against actual Power BI behavior, so what you read is what you see on screen.

  • Understand filter context and row context — the two ideas that explain every DAX surprise
  • Write calculated columns and measures that behave correctly in every visual
  • Use CALCULATE and FILTER to control what data a formula sees
  • Navigate table relationships using RELATED, RELATEDTABLE, and USERELATIONSHIP
  • Build reliable time-intelligence measures for period comparison and running totals
  • Avoid the common mistakes that produce results that look right but are not

If you are moving beyond drag-and-drop Power BI and want formulas you can trust, this book gives you the structured foundation to get there.

🎯 What you'll learn

  • Explain filter context and row context and predict how each affects a formula's result
  • Write calculated columns and measures that produce correct totals at every level of a visual
  • Use CALCULATE to reshape the filter context applied to any expression
  • Traverse table relationships with RELATED and RELATEDTABLE to pull values across your model
  • Build time-intelligence measures including month-to-date, year-over-year variance, and rolling averages
  • Identify and fix the most common DAX mistakes before they reach a published report
  • Apply iterator functions such as SUMX and AVERAGEX to row-by-row calculations
  • Structure a data model that makes DAX formulas simpler and more predictable

👤 Who is this book for?

  • Power BI users who build reports today but have never properly learned DAX and want to fix that gap
  • Business analysts moving from Excel who already understand data but need to think in terms of tables and contexts
  • BI developers new to the Microsoft stack who need a structured, practical introduction to DAX
  • Report builders who have copied DAX from the internet and want to understand why formulas work — or fail
  • Students and career-changers preparing for a data analyst role that requires Power BI proficiency

Table of contents

  1. 01

    Why DAX Exists

    Understand the problem DAX was built to solve and how it differs from Excel formulas and SQL. You set up a working Power BI environment and load the sample data used throughout the book.

  2. 02

    Tables, Columns, and Relationships

    Learn how Power BI stores data in columnar tables and how relationships between them control what a formula can see. You build a simple star-schema model and inspect how relationships propagate filters.

  3. 03

    Calculated Columns and Measures

    Write your first DAX expressions as both calculated columns and measures, and understand the critical difference between the two. You see why the same formula can return different results depending on which type you choose.

  4. 04

    Filter Context and Row Context

    Develop a solid mental model of the two evaluation contexts that govern every DAX calculation. You work through targeted examples designed to expose exactly how context shapes results.

  5. 05

    CALCULATE and Context Modification

    Master CALCULATE — the single most important function in DAX — and use it to override, extend, or remove filters applied by a visual. Real examples show you when and why to reach for it.

  6. 06

    Working Across Relationships

    Use RELATED, RELATEDTABLE, and USERELATIONSHIP to write formulas that cross table boundaries, including scenarios involving inactive relationships and ambiguous paths.

  7. 07

    Iterator Functions

    Apply SUMX, AVERAGEX, RANKX, and related iterators to perform row-by-row calculations that simple aggregations cannot handle. You learn when an iterator is the right tool and when it is not.

  8. 08

    Time Intelligence

    Build the date table your model needs and then write time-intelligence measures for month-to-date totals, year-over-year comparisons, and rolling-period analysis using DAX's built-in time functions.

  9. 09

    Common Patterns and Pitfalls

    Examine the DAX patterns that appear in almost every real-world Power BI project — including dynamic segmentation, ABC classification, and cumulative totals — alongside the mistakes that trip up intermediate users.

Frequently asked questions

Do I need prior DAX experience to read this book?

No. The book assumes you have used Power BI to build basic reports but have little or no DAX knowledge. Every concept is introduced from scratch with worked examples.

Does this book cover Power BI Desktop, Power BI Service, or both?

The focus is Power BI Desktop, where you write and test DAX formulas. The concepts apply wherever DAX runs, including Analysis Services and Excel Power Pivot, but the screenshots and workflow are Desktop-specific.

Is the book up to date given it was published in 2018?

The core DAX language — contexts, CALCULATE, iterators, time intelligence — has not changed, so the foundational content remains accurate. A small number of UI details in Power BI Desktop may differ from the current version.

Are sample files or companion datasets available?

Apress publishes source code and data files for its titles; check the book's page on the Apress website to download any companion materials provided by the author.

Is this book suitable for someone coming from an Excel background?

Yes. Excel users often find the transition to DAX natural because the function syntax is familiar, but the book clearly explains where the Excel mental model breaks down and what to think instead.

Who should look at a more advanced DAX book instead?

If you already understand filter context, use CALCULATE fluently, and are looking for advanced patterns like virtual relationships or query optimization, you will progress faster with a more advanced title.

You might also like

📬 Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.