Since this sounds like an inventory scenario, the use of MAX aggregation
is unusual - more typical would be a semi-additive aggregation.
Anyway, based on the sample data (I think that Free Stock Qty and
Movement Qty Period 1 are reversed) you wish to sum the values from the
lower product levels, maybe like:
Quote:
|
Sum(Descendants([Product].CurentMember,,LEAVES),
|
IIf([Measures].[Free Stock Qty] = 0, Null,
IIf([Measures].[Movement Qty Period 1] = 0, Null,
[Measures].[Free Stock Qty] / ([Measures].[Movement Qty Period 1]
/[Measures].[Movt P1 Days]))))
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***