Microsoft Office Tutorials and References
In Depth Information
For example, you could write a measure like this:
SUM( Orders[Amount] )
This formula calculates the sum of the Amount calculated column. However, if you do not have
a calculated column for Amount and you want to create it by using a measure, you might be
tempted to use the expression you used previously for the Amount calculated column now for
a CalcAmount measure. But this will not work, as you can see in Figure 6-5.
FIguRE 6-5 You get an error message when you define a measure by referencing a row value.
The error shown in Figure 6-5 indicates a problem related to the evaluation of a column
in the current context. Unless you have a clear understanding of evaluation context, you
are likely to find the error message very cryptic. Let us try to make it meaningful: when
you are browsing a PivotTable, you have a filter context but there is no row context
defined. The expression Orders[Quantity] requires a row context to be correctly
evaluated. So PowerPivot complains about the lack of a context in which the formula can be