Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions
  8. Creating Custom Functions
  9. Custom Function API Reference

Transformation Language Reference

Transformation Language Reference

RATE

RATE

Returns the interest rate earned per period by a security.

Syntax

RATE(
terms, payment, present value
[,
future value, type
] )
The following table describes the arguments for this command:
Argument
Required/
Optional
Description
terms
Required
Numeric. Number of periods or payments. Must be greater than 0.
The Spark engine writes null values for rows when the terms argument passes a 0 value. In the native environment, the Data Integration Service rejects the row and does not write it to the target.
payments
Required
Numeric. Payment amount due per period. Must be a negative number.
present value
Required
Numeric. Lump-sum amount that a series of future payments is worth now.
future value
Optional
Numeric. Cash balance you want to attain after the last payment. For example, the future value of a loan is 0. If you omit this argument, RATE uses 0.
types
Optional
Boolean. Timing of the payment. Enter 1 if payment is at the beginning of period. Enter 0 if payment is at the end of the period. Default is 0. If you enter a value other than 0 or 1, the
PowerCenter Integration Service
treats the value as 1.

Return Value

Numeric.

Example

The following expression returns 0.0077 as the monthly interest rate of a loan:
RATE( 48, -500, 20000 )
To calculate the annual interest rate of the loan, multiply 0.0077 by 12. The annual interest rate is 0.0924 or 9.24%.

0 COMMENTS

We’d like to hear from you!