You are doing things more complex than necessary. Your second query should be simplified to:
Select [Sales Territory].[Sales Territory].Members on 0,
[Sales Reason].[Sales Reason Type].DEFAULTMEMBER.children on 1
From [Adventure Works]
Please note that the All
member is already a member of (nearly) all hierarchies in MDX. Thus, to include the All
members for the third query, you could either write
Select {[Sales Territory].[Sales Territory].Members}
on 0,
{[Sales Reason].[Sales Reason Type].Members}
*
{[Sales Channel].[Sales Channel].Members}
on 1
From [Adventure Works]
or, if you really wanted to have the Total of the Axis only without the combinations of the Totals from one of the hierarchies with the other members of the other one, union two sets - one with the tuple containing of the All members, and one with the cross join of the other two hierarchies. I am using the short form of Union
here - which is the +
operator for sets:
Select {[Sales Territory].[Sales Territory].Members}
on 0,
{ ([Sales Reason].[Sales Reason Type].All, [Sales Channel].[Sales Channel].All) }
+
(
{[Sales Reason].[Sales Reason Type].[Sales Reason Type].Members}
*
{[Sales Channel].[Sales Channel].[Sales Reason Type].Members}
)
on 1
From [Adventure Works]