Databases Reference
In-Depth Information
Returns average
Sales
value for all sales in the 2009 periods. S
KIPMISSING
will exclude any periods that contains a #missing (NULL) value.
•
@NEXT()
and
@PRIOR()
: As the functions' names imply, their use will either
the
PRIOR
value from a specified dimension or the
NEXT
value from a
specified dimension.
Syntax:
@NEXT(mbrname[, n, Rangelist])
@PRIOR(mbrname[, n, Rangelist])
Example:
@NEXT(Sales,2,Years);
@PRIOR(Sales,2,Years);
For the
@NEXT()
function, the example returns
Sales
for the year member 2
periods ahead of the member currently being calculated. Likewise, for the
@PRIOR()
function, it returns the
Sales
for the year member 2 periods ahead
of the member currently being calculated.
Forecasting
Forecasting functions can be used to estimate values for a certain period of time.
A couple of the forecasting functions available to you are
@MOVAVG()
and the
@MOVSUM()
functions.
•
@MOVAVG()
: This function applies a moving n-term mean to an input data
set. Each term in the set is replaced by a trailing mean of n terms.
@MOVAVG()
modifies a data set for smoothing purposes.
Syntax:
@MOVAVG(mbrName [, n [, XrangeList]])
Example:
@MOVAVG(Sales,3,Jan:Jun);
In this example, the
@MOVAVG()
function smoothes sales data for the first
six months of the year on a three month term.
•
@MOVSUM()
: This function applies a moving sum to the specified
number of values in an input data set.
@MOVSUM()
modifies a data
set for smoothing purposes.
Syntax:
@MOVSUM (mbrName [, n [, XrangeList]])
Example:
@MOVSUM(Sales,3,Jan:Jun);