CALCS FOR INTERRRUPTED COUNTERS -
02-19-2004
, 11:33 AM
Heeelllppp!! ;-)
I have a cube with 3 dimensions now
[time](down to min)
[objects](all<-server<-db<-objectname)
[ttt](calculations, see above)
and [measures] with many monotonically increasing counters as measures.
For example: LogicalReads
The complication is that the periods of time when measurements were taken
(monitoring periods) are not necessarily consecutive all the time, so there
are many 'broken chains of the counter values because of that.
In addition, the objects might get swapped in and out of cache any time so
their values will be nulls :
See below for one object (leaf level of [objects]) and Calc as I'd like to
see it
Time LogicalReads Calc(as I need
it)
Day Hours Min
4 14 8
0 12
1 15
3
2 16
1
3 /* swapped out and back in min 5 */
4
5 2
2
6 5
3
7
5 13 /* interruption in monitoring */ 1
15 23
16 24
1
17
I am coming up with the following calc member but it does not work correctly
for the non-leaf members of [objects]:
iif( isempty(([ttt].[All ttt],[time].currentmember.prevmember)) or
isempty(([ttt].[All ttt],[time].currentmember)),
null,
([ttt].[All ttt],[time].currentmember) - ([ttt].[All
ttt],[time].currentmember.prevmember)
)
It feels like I need to use recursive reference here but I just don't know
how.
Thanks,
Koni. |