Rate (PQL)

Returns the interest rate per period of an annuity. RATE is calculated by iteration and can have zero or more solutions. If the successive results of RATE do not converge to within 1e-10 after 100 iterations, RATE returns null.

  • Returned Output: Numeric
  • Library: PQL \ Common \ Financial
  • Version: 2025.01.000
  • Compatibility:
    • It can be combined with other PQL functions throughout the application.
    • It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.

Syntax

Rate( <Numeric> , <Numeric> , <Numeric> , OPTIONAL <Numeric> , OPTIONAL <Boolean> , OPTIONAL <Numeric> )

* Click on the function's arguments above for more details on the input values.

Comments

This function is the same as the Microsoft Excel 'RATE' function - using the same inputs, logic, and outputs.

Function Arguments

Name

Description

Type

Optional

nper

Total number of payment periods in an annuity.

<Numeric>

 

pmt

Value representing the payment made each period.

<Numeric>

 

pv

Present value, worth now.

<Numeric>

 

fv

Future value, cash value after the last payment.

<Numeric>

 

type

Indicates when payments are due; at the end (0) or beginning (1) of the period; if omitted, the calculation uses the end (0).

Number ( <Boolean>)

Y

guess

Guess for what the rate will be.

<Numeric>

Y

Note: Literal encoding is in use; this means that Booleans and Dates are represented as numeric values (1 and 0 and timestamps or serial date numbers, respectively).

Example

In this example, an amount in the dataset is borrowed and repaid over 36 months at R100 per month to determine what the interest rate would be.

Rate( 36, 100, -([measures].[Data Sales]) )