Go to primary content

Difference from Future Period

Returns the difference between the current value and the value of an earlier period 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

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 Future Period

The sales_future_period calculated measure has the measure value for the hierarchy member that is one member after the current member at the same level.

Calculation in Template

Future period for SALES in TIME_ATTR_DIM and TIME_HIER hierarchy 1 period ago.

Definition of Calculated Measure in Analytic View

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

sales_future_period AS LEAD (SALES) OVER (HIERARCHY TIME_HIER OFFSET 1)

SELECT Statement Using the Calculated Measure

Query the analytic view, selecting sales and sales_future_period values.

SELECT time_hier.member_name as TIME,
 sales,
 sales_future_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_FUTURE_PERIOD
--------  ----------  -------------------
CY2011    6755115981           6901682399
Q1CY2011  1625299627           1715160208
Q2CY2011  1715160208           1691017693
Q3CY2011  1691017693           1723638452
Q4CY2011  1723638452           1644857783
CY2012    6901682399           7240938718
Q1CY2012  1644857783           1752414182
Q2CY2012  1752414182           1732373412
Q3CY2012  1732373412           1772037022
Q4CY2012  1772037022           1723571458
CY2013    7240938718           7579746353
Q1CY2013  1723571458           1840985832
Q2CY2013  1840985832           1821918664
Q3CY2013  1821918664           1854462764
Q4CY2013  1854462764           1809855822
CY2014    7579746353           7941102885
Q1CY2014  1809855822           1929427229
Q2CY2014  1929427229           1900013511
Q3CY2014  1900013511           1940449791
Q4CY2014  1940449791           1908099573
CY2015    7941102885               (null)
Q1CY2015  1908099573           2018132033
Q2CY2015  2018132033           1989225699
Q3CY2015  1989225699           2025645581
Q4CY2015  2025645581                (null)