Hi Mahesh,
In some situations, you can use inline set aliases to "cache" a set,
like for the Dead Stock logic:
Quote:
|
Except(Descendants([Product],,LEAVES) as StoredLeaves,
|
NonEmptyCrossJoin(StoredLeaves,
{[Time].Lag(30):[Time].PrevMember}, 1))
But when you say that "Sum(Descendants(Products,,Leaves),
Measure.Cost) is taking about a minute to process", this may be due to
the time it takes to sum over that many leaves, rather than the time to
compute the set of leaves. So how many leaves are there, and can you
measure the time to simply list them, like with this query:
Descendants([Product],,LEAVES) on rows
from [TheCube]
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***