Skip to content
Carmel Eve By Carmel Eve Software Engineer I
Learning DAX and Power BI – Row Contexts

In my last blog I ran through filter contexts, which are one half of the story around evaluation contexts. I said last time that whenever any formula is evaluated, it is evaluated in an evaluation context. We saw that this evaluation context can include a filter context, which dictates what rows in a table an expression is run over.

A row context is in some ways a specific example of this, but it only applies in iterative situations. For example, in Power BI you can create a new "calculated column" in a table.

So, if we return to our previous example:

View over data showing Name, City, DoB and Number of Children.

And we wanted an additional column which indicates whether or not a person had children, we could do this via a calculated column:

Showing calculation for calculated column.

This expression is evaluated for each row in the table to produce the following output:

Showing additional column in model.

(This is the table view in Power BI)

The way this works is that it iteratively evaluates Has children for each row of the table. At each iteration, the evaluation will have a row context. So, for the first iteration, the row context will be the first row, then the second, etc.

Row contexts just signify the "currently selected" row as we go through any iteration. Unlike filter contexts, they cannot be created by the user, they are purely used during iteration to provide the formula with the context it needs in order to do the evaluation.

These are used in any iterative process in DAX, and we will see some more examples of this as we continue.

Now that we have an understanding of the contexts in which formulae are evaluated, it's time to look at some specific examples

Learning DAX and Power BI - Aggregators

Learning DAX and Power BI - Aggregators

Carmel Eve

This is the fourth blog in a series about DAX and Power BI. We have so far covered filter and row contexts, and the difference between calculated columns and measures. This post focuses on aggregators. We cover the limitations of the classic aggregators, and demontrate the power of the iterative versions. We also highlight some of the less intuitive features around how these functions interact with both filter and row contexts.
Learning DAX and Power BI – Calculated Columns and Measures

Learning DAX and Power BI – Calculated Columns and Measures

Carmel Eve

This is the third blog in a series about learning DAX and Power BI. The first two blogs focused on filter and row contexts. We are now moving on to talk about calculated columns and measures. These are the main features used to support the display of complex visuals. They allow you to combine columns, aggregate values, reformat data, and much more. The difference between these features can get a bit confusing so we've attempted to make that clearer using some concrete examples!
Learning DAX and Power BI - Filter Contexts

Learning DAX and Power BI - Filter Contexts

Carmel Eve

Here is the first in a series of blog posts around understanding DAX and Power BI. This post focuses on filter contexts. which are a central concept which is vital for being able to write effective and powerful DAX!In this series Carmel walks through the main ideas and syntax surrounding the DAX language, and provides examples of using these over a dataset. DAX is an extremely powerful language. Using these techniques it is possible to build up complex reports which provide the insight you really need!

Carmel Eve

Software Engineer I

Carmel Eve

Carmel is a software engineer, LinkedIn Learning instructor and STEM ambassador.

Over the past four years she has been focused on delivering cloud-first solutions to a variety of problems. These have ranged from highly-performant serverless architectures, to web applications, to reporting and insight pipelines and data analytics engines.

In her time at endjin, she has written many blog posts covering a huge range of topics, including deconstructing Rx operators and mental well-being and managing remote working.

Carmel's first LinkedIn Learning course on how to prepare for the Az-204 exam - developing solutions for Microsoft Azure - was released in April 2021. Over the last couple of years she has also spoken at NDC, APISpecs and SQLBits. These talks covered a range of topics, from reactive big-data processing to secure Azure architectures.

She is also passionate about diversity and inclusivity in tech. She is a STEM ambassador in her local community and is taking part in a local mentorship scheme. Through this work she hopes to be a part of positive change in the industry.

Carmel won "Apprentice Engineer of the Year" at the Computing Rising Star Awards 2019.

Carmel worked at endjin from 2016 to 2021.