Row context in DAX refers to the current row that DAX is evaluating when performing a calculation. You can think of it as the environment that allows DAX to “know” which row it’s working on.
For example, when I create a calculated column like Profit = Sales[Revenue] - Sales[Cost], DAX automatically applies a row context. That means for every single row in the Sales table, it takes that row’s Revenue and Cost, performs the subtraction, and stores the result. So, row context is naturally created whenever DAX evaluates expressions row by row — especially in calculated columns and iterator functions like SUMX, AVERAGEX, or FILTER.
In one of my Power BI projects, I had to calculate “Commission per transaction” based on the sales amount. I used Commission = Sales[Amount] * 0.05. DAX used the row context for each record, which made it simple. However, when I wanted to calculate the total commission by region, I couldn’t rely on the same formula because measures don’t have row context by default — that’s where filter context comes into play.
A challenge I faced early on was mixing up row context and filter context. I once tried using a measure with direct column references expecting it to behave like a calculated column — it gave incorrect results because measures don’t automatically have row context. I learned to use functions like CALCULATE or iterators (like SUMX) to introduce row context where needed.
The limitation is that row context alone doesn’t apply filters to the entire table — it only focuses on the current row. So if I want to apply conditions across rows (for example, total sales above a certain threshold), I need to combine row context with filter functions.
