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.

Power BI Weekly is a collation of the week's top news and articles from the Power BI ecosystem, all presented to you in one, handy newsletter!

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.

Discover your Power BI Maturity Score by taking our FREE 5 minute quiz.

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

Carmel Eve

Software Engineer I

Carmel Eve

Carmel is a software engineer and LinkedIn Learning instructor. She worked at endjin from 2016 to 2021, focused on delivering cloud-first solutions to a variety of problems. These included highly performant serverless architectures, web applications, reporting and insight pipelines, and data analytics engines. After a three-year career break spent travelling around the world, she rejoined endjin in 2024.

Carmel has written many blog posts covering a huge range of topics, including deconstructing Rx operators, agile estimation and planning and mental well-being and managing remote working.

Carmel has released two courses on LinkedIn Learning - one on the Az-204 exam (developing solutions for Microsoft Azure) and one on Azure Data Lake. She has also spoken at NDC, APISpecs, and SQLBits, covering a range of topics from reactive big-data processing to secure Azure architectures.

She is passionate about diversity and inclusivity in tech. She spent two years as a STEM ambassador in her local community and 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.