The expression used for the calculated field '{1}' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. ...

The expression used for the calculated field '{1}' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.