How to create a computed measure using a relative time period calculation
1  
2  
In Computed Measure, complete the following tasks, as shown in Figure 4-19. These tasks differ depending on the category and time period you select.
Figure 4-19  
*
*
*
*
*
*
*
*
*
*
For example, select SUM to display the sum values for each year.
*
*
*
*
To specify a date, select This date. Then, type a date or choose Select Values to display the calendar tool from which you select a date. For example, select This date and type 06/30/2004.
*
Choose OK.
The cross tab displays the computed measure values, as shown in Figure 4-20.
Figure 4-20  
Using the * to Date and Trailing N * time periods
Data Analyzer calculates time periods, such as Month to Date, Month to Date Last Year, Quarter to Date, Quarter to Date Last Year, Previous Month to Date, Previous N Year to Date, Next N Periods, and Trailing N Periods, using the year, month, and day parts of a reference date. For example, Month to Date covers the period starting at the beginning of the reference date’s month and ending at the reference date. If the reference date is 2012-01-08, the period is 2012-01-01 to 2012-01-08. Contrast this with Current Month, which is calculated using only the year and month parts of a reference date. For a reference date of 2012-01-08, Current Month covers the entire month, 2012-01-01 to 2012-01-31.
Because the * to Date and Trailing N * time periods use the day part of a reference date, the time dimension defined in the cube must include the Day Of Year level. Figure 4-21 shows a cross-tab data pane displaying time period levels, including the Day Of Year level.
Figure 4-21  
If the time dimension in the cube does not include the Day Of Year level, and you use a * to Date or a Next N * or Trailing N * time period in a relative time period calculation, the measures display the wrong results. Month to Date returns the same results as Current Month, Quarter to Date returns the same results as Current Quarter, and so on. In other words, the day part of the reference date has no effect.

Additional Links:

Copyright Actuate Corporation 2012