<!-- https://learnsql.cpetoday.com/functions/dax/power -->
# POWER

Language: DAX
Category: Math
Syntax: POWER(<number>, <power>)
Summary: Raises a number to a power.
Returns: A number (a scalar).
Level: Intermediate
Related: SQRT, PRODUCT, ROUND, DIVIDE, ABS, MOD

## What it does
POWER multiplies a number by itself the number of times given by the power. POWER(2, 3) is 8. In finance, it is the engine behind compounding: a growth rate applied over several years, or a discount factor applied over a number of periods. The power can be a fraction, so POWER(x, 0.5) is a square root.

## Syntax and arguments
- number: the base, such as 1 plus a growth rate.
- power: the exponent, which can be a whole or decimal number, and can be negative.

## Example
The planning team has an annual cost growth rate of 4 percent and wants the cost in year five, starting from the current year's base.

```dax
Cost In Year Five =
[Base Cost] * POWER(1 + 0.04, 5)
```

The growth factor is 1.04 raised to the fifth power, about 1.2167. The base cost is multiplied by that factor, which is the compounded result. Simple multiplication by 5 times 4 percent would understate the number.

## Example: a second, different use
Discount a future payment back to today at a given annual rate, using a discount factor:

```dax
Present Value Factor = 1 / POWER(1 + [Discount Rate], [Years Out])
```

Dividing 1 by the compounded rate gives the factor to multiply a future amount by. A payment due in three years at a 10 percent rate is worth about 75 percent of its face value today.

## Things to watch
- POWER with a fractional power is a root, and a negative base can give an error for some fractions. Keep bases positive for fractional powers.
- Large powers grow fast and can exceed what the model can show. Check the size of the result.
- Compounding with POWER assumes the rate is applied in equal periods. Match the rate and the periods, such as monthly rate with months.
- Do not round intermediate factors if the result must match another system. Round at the end.
- POWER is not the same as a multiplication of the rate. Use the correct form for the business rule.

## In business terms
POWER is used for compound growth, present value and future value of cash flows, inflation indexing, depreciation factors and survival rates. Any time a rate is applied year after year, POWER or its financial equivalents are involved.
