How to sum aggregated values RRS feed

  • Question

  • We are running W2008, SQL 2008, VS2008. CRM4.0.  We are creating a report that requires aggregating field values containing running values that then need to be summed.  I am getting the following error: The value expression for the textrun contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue).  Aggregate functions cannot be nested inside other aggregate functions.

    Here is the field expression:


    Sum, Nothing)- 300000 <=0, 0,iif(RunningValue(Fields!Commitment.Value, Sum, Nothing)- 300000 - Fields!Commitment.Value >0, Fields!Commitment.Value, RunningValue(Fields!Commitment.Value, Sum, Nothing)- 300000)))*Fields!BasisPoints.Value

    When I add SUM in front I get the error. How else can this be accomplished?

    Ken Compter
    Monday, June 6, 2011 12:51 PM

All replies

  • Maybe you can create a custom field or variable on the report for the "Sum" value and then use that field or variable in your iif statement.  If that doesn't work, try to find a way to get the summed value you need rather than doing the operation in the iif statement.

    Regards, Donna

    Monday, June 6, 2011 1:49 PM