Downloads
Power Query MNumberIntermediate

Number.Power

Raises a number to a power, such as a growth factor for compounding over several periods.

Syntax
Number.Power(base as nullable number, exponent as number) as nullable number

Returns: The base raised to the exponent, or null when the input is null.

What it does

Number.Power raises a base to an exponent. The main finance use is compounding: a growth or discount factor applied over several periods. For example, a balance growing at a rate for three years is multiplied by the rate's factor three times, which is the same as raising the factor to the power 3. The function does the repeated multiplication in one step.

Syntax and arguments

Example

An investment of 1000 dollars earns a fixed growth rate per year. The team computes the value after several years by raising the yearly growth factor to the number of years.

let
    Principal = 1000,
    GrowthFactor = 2,
    Years = 10,
    Value = Principal * Number.Power(GrowthFactor, Years)
in
    Value

A factor of 2 raised to the power 10 is 1024, so the result is 1,024,000. The example uses a factor of 2 to keep the arithmetic exact. A real rate such as 1.05 works the same way, and the answer is then rounded for display.

Example: a second, different use

Turn an annual rate into a monthly rate for a loan by raising the annual factor to the power one twelfth. Name the rule in the model so the rate can be checked.

Things to watch

In business terms

Compound growth, interest, depreciation rates and present value factors all rely on powers. Making the factor visible in the query lets a controller check the rate and the period count against the agreement.

Related functions

All Power Query M functions · View as Markdown · M basics