Returns the percent difference between the measure value of the current member and the measure value of a later member at the same level.
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, and a number that specifies the offset from the current member. To select a different measure, attribute dimension, hierarchy, or number, 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 from future period for the measure name measure for the attribute dimension alias attribute dimension and the hierarchy alias hierarchy number period ahead.
Example: Example of Percent Difference from Prior Period
The sales_percent_diff_next_period calculated measure calculates the percentage of the difference between the measure value for the current member and the measure value for the hierarchy member that is one member after the current member at the same level
Calculation in Template
Percent difference from future period for SALES in TIME_ATTR_DIM and TIME_HIER hierarchy 1 period ago.
Definition of Calculated Measure in Analytic View
The SALES_AV analytic view definition MEASURES clause includes this definition of the sales_percentt_diff_next_period calculated measure:
sales_percent_diff_next_period AS
(LEAD_DIFF_PERCENT(SALES) OVER (HIERARCHY time_hier OFFSET 1)
SELECT Statement Using the Calculated Measure
Query the analytic view, selecting hierarchy members, sales values, and the percent of sales for a year compared to the previous year.
-- Select the SALES and SALES_PCT_CHG_PREV_YR measures at the YEAR level.
SELECT time_hier.member_name as TIME,
sales,
sales_percent_diff_next_period
FROM
sales_av HIERARCHIES(time_hier)
WHERE time_hier.level_name IN ('YEAR','QUARTER')
ORDER BY time_hier.hier_order;
Results of the Query
TIME SALES SALES_PERCENT_DIFF_NEXT_PERIOD -------- ---------- ------------------------------ CY2011 6755115981 -0.0212363319 Q1CY2011 1625299627 -0.0523919458 Q2CY2011 1715160208 .0142769145 Q3CY2011 1691017693 -0.0189255232 Q4CY2011 1723638452 .0478951251 CY2012 6901682399 -0.0468525328 Q1CY2012 1644857783 -0.0613761289 Q2CY2012 1752414182 .0115683894 Q3CY2012 1732373412 -0.0223830597 Q4CY2012 1772037022 .0281192662 CY2013 7240938718 -0.044699073 Q1CY2013 1723571458 -0.0637779894 Q2CY2013 1840985832 .0104654336 Q3CY2013 1821918664 -0.017549072 Q4CY2013 1854462764 .0246466824 CY2014 7579746353 -0.0455045776 Q1CY2014 1809855822 -0.0619724883 Q2CY2014 1929427229 .0154807939 Q3CY2014 1900013511 -0.0208386117 Q4CY2014 1940449791 .0169541561 CY2015 7941102885 (null) Q1CY2015 1908099573 -0.0545219333 Q2CY2015 2018132033 .0145314502 Q3CY2015 1989225699 -0.0179793952 Q4CY2015 2025645581 (null)
Parent topic: Prior and Future Periods