I want to pull back a cellset with two levels of a hierarchy on the same dimension. Using AdventureWorks as an example, let's say I want "Account Level 01" and "Account Level 02" both on the rows dimesion.
When I send MDX like this:
SELECT
{[Account].[Accounts].[Account Level 01].Members * [Account].[Accounts].[Account Level 02].Members}
DIMENSION PROPERTIES MEMBER_TYPE ON AXIS(0) FROM [Adventure Works]
I get this error message:
The Accounts hierarchy is used more than once in the Crossjoin function.
What MDX would I need in this situation? I've tried spying on the MDX generated by BIDs, but it uses so many temporary SETs that it's nearly impossible to follow.
Thanks for any help,
Terry
Terry,
If my understanding of what you are trying to do is correct, one possible solution would be to use the "Generate()" function:
Generate([Account].[Accounts].[Account Level 01].Members,
{[Account].[Accounts].CurrentMember,[Account].[Accounts].CurrentMember.Children})
HTH,
Steve
No comments:
Post a Comment