Forum Discussion
values() vs row context
- 4 years ago
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.
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.