PowerPivot Excel session calculated members do not always work - by GregGalloway

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 582492 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 8/2/2010 9:11:24 AM
Access Restriction Public


When you use the Excel API PivotTable.CalculatedMembers.Add to add a session calculated member to a PowerPivot PivotTable, certain MDX expressions do not work. For example, if you add a dimension calculated member that uses the Aggregate MDX function, the PivotTable displays this error message:

ERROR - CALCULATION ABORTED: MdxScript(Sandbox) (4, 48) The expression invokes an object that was defined by using an MDX calculated member or script. Such objects are not supported in DAX expressions.

An example PowerPivot workbook showing the error is attached. And this is discussed more here:
Sign in to post a comment.
Posted by Microsoft on 9/21/2010 at 4:07 PM
This can be addressed by providing a positive solve order as an argument to PivotTable.CalculatedMembers.Add, but this may not work when the MDX Aggregate function is used in the definition of the Calculated Member. An alternate solution would be to replace the Aggregate function with an explicit aggregation function such as SUM.

Hope this is helpful.
Analysis Services Team
Posted by bjele on 8/4/2010 at 7:04 AM
This would be a nice addition to PowerPivot v2.