ceth
ceth

Reputation: 45295

StrToSet by list of members

I have a correct MDX query:

SELECT {[Measures].[IssueOpened] } ON COLUMNS,
       {(  STRTOSET("[Assigned To].[Id].[Some]:[Assigned To].[Id].[Another]") * 
         [Priorities].[Id].[Id].ALLMEMBERS ) } ON ROWS
FROM (SELECT (STRTOSET("[CreatedOn].[Date].&[2005-01-01T00:00:00]:[CreatedOn].[Date].&[2011-12-01T00:00:00]") ) ON COLUMNS
     FROM [Reports])

I need to define a list of attributes (not range) so I modified the query like this:

SELECT {[Measures].[IssueOpened] } ON COLUMNS,
       {(  STRTOSET("[Assigned To].[Id].[Some], [Assigned To].[Id].[Another]") * 
         [Priorities].[Id].[Id].ALLMEMBERS ) } ON ROWS
FROM (SELECT (STRTOSET("[CreatedOn].[Date].&[2005-01-01T00:00:00]:[CreatedOn].[Date].&[2011-12-01T00:00:00]") ) ON COLUMNS
     FROM [Reports])

I have changed

STRTOSET("[Assigned To].[Id].[Some]:[Assigned To].[Id].[Another]")

to:

STRTOSET("[Assigned To].[Id].[Some], [Assigned To].[Id].[Another]")

But last query returns error. How can I define a list of attributes in query?

Upvotes: 1

Views: 381

Answers (1)

Max
Max

Reputation: 804

Try to add {}.

STRTOSET("{[Assigned To].[Id].[Some], [Assigned To].[Id].[Another]}")

Upvotes: 2

Related Questions