Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I am trying to understand row context in values() formula. In the printscreen, I have created a calculated column using values(sales[product category]) as the interation context.
I'm not sure how DAX calculates values(sales[ product category] (based on the whole sales table or based on the current row of column -product cateogry?). It looks the calculated column gives me the total sales per [product category] and per [sales amount]. Why does it work that way?
Can someone explains step by step how the filter context is modified ?
Solved! Go to Solution.
In this case, it's using the row context from the table argument values(sales). It iterates over each row in this table using the row context from this table.
When you write values(sales[product category]), this does not contain the [sales amount] and [retail margin] columns, so these cannot be from that row context and it instead interprets it as the original row context.
When you're working with calculated columns there isn't any filter context unless CALCULATE is involved. So when you reference a column, it assumes that you are either referring to the value in the current row (row context) or referencing the entire column (it assumes this when you put a column name inside an aggregation function).
In your formula, values(sales[ product category]) is the list {"1A", "2A", "3A"} so it's iterating through the three items and adding the result of sales[sales amount*sales[retail margin] for each iteration, effectively multiplying it by three.
Thanks, Alexis.
I'm still a bit confused with row context. There are actually two row contexts, the old row context comes from the calculated column, a new row context is created when a values() formula is created. Not sure which row context is used here.
If I change the values() formula to the values(sales), it seems to iterate each row based on the row context (not sure if it's the new row context or old row context as they are the same) and sum up the total. In other words, it doesn't multiple by
In this case, it's using the row context from the table argument values(sales). It iterates over each row in this table using the row context from this table.
When you write values(sales[product category]), this does not contain the [sales amount] and [retail margin] columns, so these cannot be from that row context and it instead interprets it as the original row context.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 62 | |
| 31 | |
| 26 | |
| 25 |