Aggregate functions cannot be nested inside other aggregate functions
I have this problem.
I'm using table, and in field i use an expression this is the expression:
IIf(Sum(Fields!Quantity.Value)<Fields!Target.Value,0,(Sum(Fields!Quantity.Value)- Fields!Target.Value)*Fields!Commission.Value
And then the footer I want to SUM the result of each expression.
But when I use SUM with this expression :
SUM(IIf(Sum(Fields!Quantity.Value)<Fields!Target.Value,0,(Sum(Fields!Quantity.Value)- Fields!Target.Value)*Fields!Commission.Value)
It's give me this error :
Error 1 The Value expression for the textbox 'textbox66' 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.
What should I do?

