Hi,
I need to generate MDX statement which returns a total row with the sums of all columns. I wrote the following MDX, but the row with calculated members is missing in the result. This happens only when I use in rows two alternate hierarchies of one dimension (in this case the Product dimension). How could I rewrite this MDX to get it working? I could not use the all members, because both hierarchies used to be filtered in my real project.
with
member [Product].[Category].[Total 1] as
sum([Product].[Category].Levels(1).AllMembers)
member [Product].[Product Categories].[Total 2] as
sum([Product].[Product Categories].Levels(3).AllMembers)
select
{
([Product].[Category].[Total 1], [Product].[Product Categories].[Total 2]),
{[Product].[Category].Levels(1).AllMembers * [Product].[Product Categories].Levels(3).AllMembers}
} on rows,
[Measures].[Internet Gross Profit] on columns
from [Adventure Works]
Best regards,
Peter