From the course: Advanced Power BI: DAX Language, Formulas, and Calculations

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

DAX measure evaluation context

DAX measure evaluation context

- [Instructor] Many of the DAX measure functions even look like the ones we see in Excel, but they don't work in the same way because DAX measures calculate the results based on the context in which we evaluate them. DAX works on columns and tables, and unlike Excel, we can't reference a cell directly. The pivot coordinates themselves of the visual we're evaluating a measure in first determine how DAX will evaluate the measure. If we want to reference a value in the dimensions of the pivot coordinates in a calculation directly, we need to set up a parameter harvesting measure to extract the value of the pivot coordinates directly so we can use it in other calculations. To set up this measure, we can use DAX functions like AVERAGE or SUM, but I recommend using MAX because it works with all types of dimension value inputs, including date and text values. Within the MAX function, we can put the field we want to get the…

Contents