Oracle Error ORA-36168: (XSMXAGGR10) COUNTVAR variable workspace object must have the same dimensionality as workspace object

Oracle Error Message

ORA-36168: (XSMXAGGR10) COUNTVAR variable workspace object must have the same dimensionality as workspace object

Reason for the Error

The user specified a COUNTVAR variable which is missing at least one dimension of the aggregation variable

Solution

Specify a COUNTVAR variable which has at least as many base dimensions as the aggregation variable