Chapter 7 starts off with a section that talks a bit about how DAX measures are calculated. The point of the chapter, the text says, is to teach you to “think like DAX.” To do this, some DAX calculations are stepped through to show how the numbers are arrived at. Following that, three “golden rules” of DAX are presented:
- DAX measures are evaluated against the source tables, not the Pivot (by “source tables” I believe he means the imported data in the PowerPivot model)
- Each measure cell is calculated independently
- DAX measures are evaluated in two phases:
- Apply filters
- Evaluate the arithmetic
Three tips round out the chapter:
- Don’t use “naked” column references in measure formulas (you need to wrap column references in aggregation functions).
- Best practice #1: When referring to columns, preface with table name; when referring to measures, don’t. This will make it easier to tell what’s what when you read your formulas later.
- Best practice #2: Assign measure to the right tables. Rule of thumb is to assign measures to the table where the numeric columns used in the formula come from.
I like the way the book is building so far. I also like that the chapters are bite-sized and I can read one each day without too much trouble. Assuming I can continue to go through one chapter per day, I’m 2 weeks away from finishing. Just in time for New Years…