Custom member formula & aggregation performances -
04-03-2006
, 03:59 AM
Hi !
I'm new in mdx...
I've 6 axis in my cube :
- Schedule
- Unit_Affaires
- Version
- Individus
- Period
- Measures
I've created a custom member formula on a Version Member called Bi
calculé with a formula as bellow:
Iif ( IsLeaf ( [Period].CurrentMember)
and IsLeaf ( [Unit_Affaires].CurrentMember) ,
([Period].&[-9],[Version].&[-15])
/
StrToValue (
[Unit_Affaires].CurrentMember.Properties("nbmois_initial") ) ,
Sum(
Descendants ( [Individus].currentMember, ,LEAVES )
,
Sum (
Descendants ( [Unit_Affaires].currentMember, ,LEAVES )
,
Sum (
Descendants ( [Period].currentMember, ,LEAVES ) ,
[Measures].[Amount]
)
)
)
)
)
)
It works well but my calculation takes a long time at the
Unit_Affaires top level.
As you can read, I've tested at the non leafes and after I made the
aggregation with
Sum ( Sum ( Sum ) ) ) expression but it's very slow.
I've used the filter ( crossjoin ( ) expression but it's too fast.
Moreover The nonemptycrossjoin expression doesn't work, I don' have any
results with this syntax:
SUM( NonEmptyCrossJoin(Descendants ( [Individus].currentMember, ,LEAVES
),Descendants ( [Unit_Affaires].currentMember, ,LEAVES ),Descendants
( [Period].currentMember, ,LEAVES )),
Measures.[Amount])
1) How can you explain that there is no results with this
NonEmptyCrossJoin expression ?
But I've read in a book that GENERATE function is faster.
2) How can you write the syntax with GENERATE?
Thanks in advance for your welcome explanations |