SYMPTOM
In Strategy Analytics Enterprise 9.4.1 with Hotfix 6 installed, there are very specific situations where incorrect SQL will be generated for a report with 2 or more metrics. This can be observed in the SQL view where some rows will show only the column alias instead of the full column expression before the column alias. For example:
Incorrect SQL:
select a11.Attribute1 attr1,
a12.Attribute2 attr2,
WJXBFS1,
WJXBFS2
from Table1 a11
cross join Table2 a12
...
select a11.Attribute1 attr1,
a12.Attribute2 attr2,
(Case when count(X)>1 then A else B end) WJXBFS1,
(Case when count(Y)>1 then A else B end) WJXBFS2
from Table1 a11
cross join Table2 a12
...


select pa13.COUNTRY_ID COUNTRY_ID, a14.COUNTRY_NAME CUST_COUNTRY_DESC0, pa13.WJXBFS1 WJXBFS1, pa13.WJXBFS2 WJXBFS2 from (select a12.COUNTRY_ID COUNTRY_ID, count(a12.COUNTRY_ID) WJXBFS1, WJXBFS2 from `CITY_CTR_SLS` a11 join `LU_CALL_CTR` a12
CAUSE
This is a known issue specific only to Hotfix 6 for Strategy Analytics Enterprise 9.4.1. Strategy Analytics Enterprise 9.4.1 GA or any previous Hotfix will not show this behavior.
This issue has been observed in reports with 2 or more conditional metrics which have been configured to work with an outer join. At the same time, VLDB property for SQL Global Optimization must be set to Level 3 or 4.
ACTION
This issue has been fixed in Strategy Analytics Enterprise Hotfix 7. Upgrade to this version to take advantage of the fix.
WORKAROUND
A possible workaround is to set the VLDB property for the SQL Global Optimization to Level 2.
The Strategy internal reference number for the issue discussed in this article is 978925.