Oracle® OLAP DML Reference 11g Release 1 (11.1) Part Number B28126-01 |
|
|
View PDF |
The DEPRSL function calculates the depreciation expenses for a series of assets. DEPRSL uses the straight-line method, as described in "DEPRSL Calculation Method", to depreciate the assets over the specified lifetime of the assets. The starting and ending values are specified for the assets acquired in each time period.
Return Value
DECIMAL, dimensioned by all the dimensions of start-exp.
Syntax
DEPRSL(start-exp end-exp n [STATUS] [{FULL|HALF| portion-exp} [time-dimension]])
Arguments
A numeric expression that contains the starting values of the assets. The start-exp expression must be dimensioned by a time dimension. For each value of the time dimension, start-exp contains the initial value of the assets acquired during that time period. In addition to a time dimension, start-exp can also have non-time dimensions.
A numeric expression that contains the ending values of the assets. The end-exp expression must be dimensioned by the same dimensions as start-exp. For each value of the time dimension, end-exp contains the final (or salvage) value for the assets acquired during that time period. Each value of start-exp must have a corresponding end-exp value. For example, when the assets acquired in 1995 have a salvage value of $200, then the value of end-exp for 1995 is $200.
An INTEGER
expression that contains the depreciation lifetime of the assets. The n expression can have any of the non-time dimensions of start-exp, but it cannot have a time dimension.
Specifies that DEPRSL should use the current status list (that is, only the dimension values currently in status in their current status order) when computing the depreciation expenses. By default DEPRSL uses the default status list.
(Default) Specifies that the full amount of a time period's depreciation expense is charged to the time period in which assets were acquired. Charges the full amount to all of the assets in the series.
Specifies that half of the full amount of a time period's depreciation expense is charged to the time period in which assets were acquired. Charges half the full amount to all of the assets in the series. When you specify HALF as the portion of depreciation expenses to charge to the period of acquisition, the HALF factor is applied to each period. Half of each period's full depreciation expense is rolled to the next period, and the final half period of depreciation takes place in the time period n
+ 1
. You might want to use HALF when assets are acquired during the second half of the time period.
When you want to charge the full amount for some assets and half the amount for other assets, you can supply a portion-exp expression that is dimensioned by any of the non-time dimensions of start-exp. The portion-exp expression must be a text expression with values of FULL or HALF.
The name of the time dimension by which start-exp and end-exp are dimensioned. When the time dimension has a type of DAY, WEEK, MONTH, QUARTER, or YEAR, the time-dimension argument is optional.
Notes
DEPRSL Calculation Method
DEPRSL calculates the depreciation expense for a given time period as the sum of that period's depreciation expenses for all assets in the series that are not yet fully depreciated. The first period of depreciation for an asset is the period in which it was acquired.
DEPRSL and NA Values
When a value of start-exp is NA
and the corresponding value of end-exp is not NA
, an error occurs. Similarly, when a value of end-exp is NA
and the corresponding value of start-exp is not NA
, an error occurs.
DEPRSL is affected by the NASKIP option when a value of start-exp and the corresponding value of end-exp are both NA
. When NASKIP is YES
(the default), DEPRSL treats the values as zeros when calculating the depreciation expenses. When NASKIP is NO
, DEPRSL returns NA
for all affected time periods.
Examples
Example 7-71 Using DEPRSL to Calculate Depreciation Expenses for Assets Acquired in a Single Period
This example shows how to use DEPRSL to calculate depreciation expenses for assets acquired in a single time period.
The following statements create two variables called assets
and salvage
.
DEFINE assets DECIMAL <year> DEFINE salvage DECIMAL <year>
Suppose you assign the following values to the variables assets
and salvage
.
YEAR ASSETS SALVAGE -------------- ---------- ---------- Yr95 1,000.00 100.00 Yr96 0.00 0.00 Yr97 0.00 0.00 Yr98 0.00 0.00 Yr99 0.00 0.00 Yr00 0.00 0.00
The variable assets
contains the starting value of assets acquired in 1995. The variable salvage
contains the ending value of the assets acquired in 1995.
The following statement reports the values of assets and salvage, and uses DEPRSL to calculate depreciation expenses for each year, specifying an asset lifetime of 5 years.
REPORT assets salvage W 12 HEADING 'Depreciation' - DEPRSL(assets salvage 5 FULL year)
This statement produces the following output.
YEAR ASSETS SALVAGE Depreciation -------------- ---------- ---------- ------------ Yr95 1,000.00 100.00 180.00 Yr96 0.00 0.00 180.00 Yr97 0.00 0.00 180.00 Yr98 0.00 0.00 180.00 Yr99 0.00 0.00 180.00 Yr00 0.00 0.00 0.00
Example 7-72 Using DEPRSL to Calculate the Depreciation Expenses for Assets Acquired in Multiple Periods
You can also use DEPRSL to calculate the depreciation expenses for a series of assets. Suppose you change the values for the year 1997 in the variables assets
and salvage
to the values shown in the following report.
YEAR ASSETS SALVAGE -------------- ---------- ---------- Yr95 1,000.00 100.00 Yr96 0.00 0.00 Yr97 500.00 50.00 Yr98 0.00 0.00 Yr99 0.00 0.00 Yr00 0.00 0.00 Yr01 0.00 0.00 Yr02 0.00 0.00
Now assets
and salvage
contain nonzero values for 1995 and for 1997.
The following statement reports asset and salvage values along with depreciation expenses for the assets. Note that the call to DEPRSL to calculate the depreciation expenses specifies an asset lifetime of 5 periods (in this case, years).
REPORT assets salvage W 12 HEADING 'Depreciation' - DEPRSL(assets salvage 5 FULL year)
This statement produces the following report.
YEAR ASSETS SALVAGE Depreciation -------------- ---------- ------------- -------------------- Yr95 1,000.00 100.00 180.00 Yr96 0.00 0.00 180.00 Yr97 500.00 50.00 270.00 Yr98 0.00 0.00 270.00 Yr99 0.00 0.00 270.00 Yr00 0.00 0.00 90.00 Yr01 0.00 0.00 90.00 Yr02 0.00 0.00 0.00
The assets acquired in 1995 were fully depreciated in 1999. Therefore, for 2000 and 2001, DEPRSL returns a figure that includes the depreciation expense for the assets acquired in 1997 only.