Calculates the percent difference in values between the current period 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
Percent 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 based on the position from the { beginning to end | end to beginning } of the period
Example: Example of Percent Difference from Parallel Period
The sales_pct_chg_yr_ago calculated measure calculates the percentage of the difference in values between the current period and the parallel period one year ago.
Calculation in Template
Percent 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_pct_chg_yr_ago calculated measure:
sales_pct_chg_yr_ago AS LAG_DIFF_PERCENT (SALES) OVER (HIERARCHY TIME_HIER OFFSET 1 ACROSS ANCESTOR AT LEVEL YEAR)
SELECT Statement Using the Calculated Measure
select TIME_ATTR_DIM.TIME_HIER.member_caption as "TIME_ATTR_DIM",
PRODUCT_ATTR_DIM.PRODUCT_HIER.member_caption as "PRODUCT_ATTR_DIM",
round(SALES,2) as "SALES" ,
round(SALES_PCT_CHG_YR_AGO,4) as "SALES_PCT_CHG_YR_AGO"
from SALES_AV HIERARCHIES(TIME_ATTR_DIM.TIME_HIER, PRODUCT_ATTR_DIM.PRODUCT_HIER)
where (TIME_ATTR_DIM.TIME_HIER.level_name in ('ALL','YEAR')) and
(PRODUCT_ATTR_DIM.PRODUCT_HIER.level_name in ('ALL','DEPARTMENT'))
order by
TIME_ATTR_DIM.TIME_HIER.hier_order,
PRODUCT_ATTR_DIM.PRODUCT_HIER.hier_order
Results of the Query
TIME_ATTR_DIM PRODUCT_ATTR_DIM SALES SALES_PCT_CHG_YR_AGO ------------- ------------------------ -------------- -------------------- (null) (null) 36418586335.29 (null) (null) Cameras and Camcorders 2381468141.49 (null) (null) Computers 33412202644.29 (null) (null) Portable Music and Video 624915549.51 (null) CY2011 (null) 6755115980.73 (null) CY2011 Cameras and Camcorders 441999885.45 (null) CY2011 Computers 6197250430.29 (null) CY2011 Portable Music and Video 115865664.99 (null) CY2012 (null) 6901682398.95 0.0217 CY2012 Cameras and Camcorders 451487775.73 0.0215 CY2012 Computers 6331603800.78 0.0217 CY2012 Portable Music and Video 118590822.44 0.0235 CY2013 (null) 7240938717.57 0.0492 CY2013 Cameras and Camcorders 472866559.56 0.0474 CY2013 Computers 6643616381.85 0.0493 CY2013 Portable Music and Video 124455776.16 0.0495 CY2014 (null) 7579746352.89 0.0468 CY2014 Cameras and Camcorders 496952312.98 0.0509 CY2014 Computers 6952712285.9 0.0465 CY2014 Portable Music and Video 130081754.01 0.0452 CY2015 (null) 7941102885.15 0.0477 CY2015 Cameras and Camcorders 518161607.77 0.0427 CY2015 Computers 7287019745.47 0.0481 CY2015 Portable Music and Video 135921531.91 0.0449
Parent topic: Parallel Period