I defined 3 parent-child dimensions, which are customer, product and time. For each dimension, there are several levels. And there can be data at some nonleaf levels of each dimension. I want to get the aggregations in this way:
1. if there is a datamember at nonleaf level, then use it
2. if there is no datamember at that level, try to aggregate from the members below.

when designing these 3 dimensions, in the property "custom rollup formula", I use the following expression:
CalculationPassValue( ([customer].CurrentMember.Datamember, [product].CurrentMember.Datamember, [time].CurrentMember.Datamember), 0 )

BUt this works only if there is data at the dimension levels specified explicitly in user queries. When trying to get the aggregation at the levels above those having datamembers, then empty cells will be returned. I think maybe the rollup formula should be sth. like:

IIf(IsEmpty(([customer].CurrentMember.Datamember, [product].CurrentMember.Datamember, [time].CurrentMember.Datamember)), currentmember, CalculationPassValue( ([customer].CurrentMember.Datamember, [product].CurrentMember.Datamember, [time].CurrentMember.Datamember), 0 ) )

However, I tried some expressions like the above but only got some error messages. Can anyone help me?
Thanks so much