57.1 DAX Formulas for PowerPivot – Chapter 7

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:

  1. 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)
  2. Each measure cell is calculated independently
  3. DAX measures are evaluated in two phases:
    1. Apply filters
    2. Evaluate the arithmetic

Three tips round out the chapter:

  1. Don’t use “naked” column references in measure formulas (you need to wrap column references in aggregation functions).
  2. 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.
  3. 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…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s