Go to primary content

Difference from Parallel Period

Calculates the difference between the current value and a prior parallel period.

The template presents a measure of the analytic view, an attribute dimension the analytic view is dimensioned by, a hierarchy that uses the attribute dimension, a position, a number that specifies the offset from the current member, a level, and a position. To select a different value, click the underlined value in the template and make a selection from the Select Measures dialog box or the drop-down list or enter a different number value.

Template

Difference between the measure name measure for the attribute dimension alias attribute dimension and the hierarchy alias hierarchy and the { parallel period | parallel period closest } number level name ago based on the position from the { beginning to end | end to beginning } of the period.

Example: Example of Difference from Parallel Period

The sales_diff_parallel_period calculated measure calculates the difference in values between the current period and the parallel period one year ago.

Calculation in Template

Difference between the SALES measure for the TIME_ATTR_DIM attribute dimension and the TIME_HIER hierarchy and the parallel period 1 YEAR ago based on the position from the beginning to end of the period..

Definition of Calculated Measure in Analytic View

The MEASURES clause of the SALES_AV analytic view definition includes this definition of the sales_diff_parallel_period calculated measure:

  sales_diff_parallel_period AS 
    LAG_DIFF (SALES)
      OVER (HIERARCHY TIME_ATTR_DIM.TIME_HIER OFFSET 1 ACROSS ANCESTOR AT LEVEL YEAR 
      POSITION FROM BEGINNING)

SELECT Statement Using the Calculated Measure

Query the analytic view, selecting sales and sales_diff_parallel_period values.

SELECT time_hier.member_name as TIME,
 sales,
 sales_diff_parallel_period
FROM
 sales_av HIERARCHIES(time_hier)
WHERE time_hier.level_name IN ('YEAR')
ORDER BY time_hier.hier_order;

Results of the Query

TIME    SALES           SALES_DIFF_PARALLEL_PERIOD
------  -------------   --------------------------
CY2011	6755115980.73	                    (null)
CY2012	6901682398.95	              146566418.22
CY2013	7240938717.57	              339256318.62
CY2014	7579746352.89	              338807635.32
CY2015	7941102885.15	              361356532.26