This is a classic problem in MDX, it is worth creating MDX antiprocessors and putting it at number 1.
The cross join that you are calculating will produce tuples of size 400x60000x500 = 12000000000 (12X10 ^ 9), and we ask you to evaluate each of them. This makes a lot of estimates per second.
Looks like a βweirdβ way of doing exercises. I would choose drillthrough , but try to solve this problem in MDX:
The solution attempts to reduce the number of tuples generated using nonempty as soon as possible. So:
noempty( noempty(A) x noempty(B) ) x noempty(C) or noempty(A) x noempty( noempty(B) x noempty(C) )
Using the first version with a few less non-empty:
select [Dec] on 0, nonempty( nonempty( Descendants([Account].[Account].[Total],,leaves) * nonempty( Descendants([Activity].[Activity].[Total],,leaves) , [DEC] ) , [DEC] ) * { Descendants([CostCenter].[CostCenter].[Total],,leaves) } , [DEC] ) on 1 from [finance]
In icCube, you will create a Function that performs this operation to simplify the syntax:
Function megaCrossjoin1(A,B,C,M) as nonempty( nonempty(A,M) * nonempty(B,M), M) * nonempty(C,M)
and use it
megaCrossjoin1( Descendants([Account].[Account].[Total],,leaves) , Descendants([Activity].[Activity].[Total],,leaves) , Descendants([CostCenter].[CostCenter].[Total],,leaves) , [Dec])
hope this helps