SYMPTOM:
The following error is returned in a report that contains a metric using an ApplySimple statement:

Error: Error(s) occurred while loading report: DSSSQLEngine: converting Report : Template (Local Template). -Template Unit Metrics-Template Metrics-Dimensional Metric (TestingApplyAgg). -Dimensional Metric-Dimensional Metric-Aggregation Metric (). -Aggregation Metric Expression-Aggregation Metric-Aggregation Metric Branch-Aggregation Metric Expression-Aggregation Metric Shortcut-Schema/Report Loading is interrupted by invalid data..
Error in Process method of Component: SQLEngineServer, Project SQL Strategy Tutorial, Job 9657, Error Code= -2147212797.
CAUSE:
The report could not calculate the aggregation function necessary to complete the SQL generation.
ACTION:
Verify the metric definition and ensure the ApplySimple statement does not contain level specifications as the example shown below

Remove the {~} level of the ApplySimple statement.
