phuhn


Hi

I am concerned about the size of query (number of bytes) so I am looking at WITH SET as a option to not having long sets appear multiple times in the MDX query. For example:

WITH SET [Selected DeptIds] AS

{ [Funding Deptid].[DeptId].[260000], [Funding Deptid].[DeptId].[261300] }

In the MDX I am currently working, the Dept list could be hundreds of Ids and could appear twice in the code. One list appears in a sub-query. MDX recognizes the main body reference to [Selected DeptIds] but in the sub-query I get the following:

Query (18, 16) The dimension '[Selected DeptIds]' was not found in the cube when the string, [Selected DeptIds], was parsed.

Any suggestions



Re: WITH SET referenced in sub-query

Christopher Webb


I'm pretty sure it's not possible to use sets declared in a WITH clause in a subquery, unfortunately...

Chris







Re: WITH SET referenced in sub-query

phuhn

Sad ...

If the scope of a WITH SET does not drill into sub-query, then it seems to have limited benefit. The only benefit as I see, is with a global named set defined with a CREATE statement.