SYMPTOM
When running a report, attribute elements are not being grouped correctly by the Analytical Engine in Strategy Developer, as shown in the image below:

CAUSE
This behavior is common when the ID of an attribute is mapped to a text column of a fixed length (e. g. CHAR(30)). In such case, it is possible that some elements are sometimes stored with trailing blank spaces.
ACTION
Use the Trim function on the attribute form definition to trim the trailing spaces. Go to the Attribute Editor and choose the attribute form that uses a fixed length column. Then, in the Attribute Form Editor, choose the expression and click Modify. In the Modify Form Expression window, type 'Trim(COLUMN_NAME)' as shown below:

Click OK and save the changes. The trailing spaces should now be trimmed and the report will group the attribute elements as expected.