Calculated member getting last non empty value doesn't aggregate as I wish. -
05-03-2004
, 09:16 AM
Hi! I have a calculated member using the formula at the bottom of this
message to get the last non null value on any date in the time dimension. It
evaluates correctly at the bottom level of any other dimension, but at the
higher levels the formula gets the previous non null value of the current
time level, which will be wrong if the bottom level lacks data and should
fetch the previous non null value for some of the dimension members.Umm,
this is pretty difficult to explain, but the bottom line is that I want the
evaluated data from the bottom level aggregated instead of the formula
evaluating the rolled up raw data. Any help would be appreciated. In
addition, I use the following custom rollup formula for the time dimension:
Tail(Filter([Time].CurrentMember.Children, (NOT [Measures].CurrentMember =
NULL))).Item(0). (Yes, the measure data is null, not empty)
IIf(
([Measures].[value], [Time].CurrentMember) = NULL,
IIF(([Measures].[value], Tail (
Filter (
{ OpeningPeriod ([Time].CurrentMember.Level, [Time].[All Time]) :
[Time].CurrentMember },
Not [Measures].[value] = NULL
)
).Item(0)) = NULL,
NULL,
([Measures].[value], Tail (
Filter (
{ OpeningPeriod ([Time].CurrentMember.Level, [Time].[All Time]) :
[Time].CurrentMember },
Not [Measures].[value] = NULL
)
).Item(0)))
,
Measures.[value]
)
Lars-Erik |