This discussion is archived
0 Replies Latest reply: Nov 13, 2012 9:37 PM by 938723 RSS

Forcing cumulative style Expressions to Break at Parent Level

938723 Newbie
Currently Being Moderated
I have two time dimensions.

Time and Date. Time represents minutes, hours, etc.. Date represents actual dates.

Within my date dimension I have two levels, intraday and day. intraday represents portions of the day i.e first half, second half.

I am trying to create my formulas so that they iterate over my time dimension, but I want them to reset based on the DAY level of my date dimension. Currently they are resetting based on the INTRADAY level.

Example OLAP Expression.

MAX(MYCUBE.HIGH) OVER (HIERARCHY TM.SESS BETWEEN UNBOUNDED PRECEDING AND CURRENT MEMBER WITHIN LEVEL)

I've written some DML which forces this, but I am wondering if there is a better way. Can this be handled in the expression itself?

argument _cube text
argument _meas text
argument _dt DT

if DT_LEVELREL eq 'INTRADAY'
then return chgdims(&objorg(MEASURE cube meas) LIMIT lmt(lmt(DT TO _dt)-
to parents using relation DT_PARENTREL qualify DT_HIERLIST 'IH'))
else return &objorg(MEASURE cube meas)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points