SAP Message BRAIN054 - Key figure &1 with attribute &2 cannot be sensibly calculated

Diagnosis
The calculated key figure &V1& uses the formula variable &V2&. Thisvariable is replaced using the attribute of a characteristic. You areexpecting the reference characteristic to replace the variable andcalculate the formula before it starts the aggregation process.
However, this is not possible, because in the formula, the aggregationprocess is not the same in each of the basic key figures or there areadditional calculated key figures in the formula.

System Response
The query is generated in such a way that the variable is replaced andthe relevant sub-formulas are calculated after aggregation. Thisis why the result is not what you expect.

Procedure
Try to split the formula into sub-formulas, so that the system is ableto process the formula as you want it to.