SUMMARY:
This article describes an issue in Strategy where SQL will not be generated correctly when using an attribute with a compound ID in a metric without specifying a form. The resulting SQL will contain just the Metric Alias. This article does contain a solution.
SYMPTOM:
If developers have created a metric that uses an ApplySimple and an Attribute with a compound ID without specifying a specific form, the SQL will not be generated correctly when running the report.
STEPS TO REPRODUCE:
Step 1) Create an attribute with a compound ID.

Step 2) Create a metric using the following syntax, Sum(ApplySimple("#0", <Attribute Name>, 1)){~}.

Step 3) Create a report using the 'Region' attribute and the metric created in Step 2.

Step 4) When users execute the report, they will notice that the 'ApplySimple' is ignore resulting in just the Metric Alias. This will cause an error from the database.

CAUSE:
This is working as designed as when no attribute form is specified for an attribute with an applysimple it defaults to the ID form. With a compound ID form there is no single ID form to resolve to so it is unsafe to generate SQL.
ACTION:
This issue does have a solution. Developers can define the form to use when creating the metric's ApplySimple statement as shown below.

TO LEARN MORE:
To learn more regarding Compound Attributes, please see Chapter 7: Attributes with multiple ID columns: Compound attributes in the Project Design Guide.
Review the articles below in the 'Related Links' section for more information on this topic.