POWER
POWER('Node1' | value, 'Node2' | value)
The POWER function returns the power of the values, using the first input as the base and the second as the exponent. Both inputs can be numbers as well as nodes.
Use this function when you need to raise a node or numeric value to a fixed or row-wise exponent.
Parameters
- Base (
Node1 | value)Node reference or numberRequired - The value that will be multiplied by itself, specified using the node name in single quotes (e.g.
'Profit') - Exponent (
Node2 | value)Node reference or numberRequired - The number of times the base will be multiplied by itself. Can also be a number or a fraction, for example
1/3to calculate a third root.
Watch out
Three combinations are mathematically undefined and make the whole calculation fail, not just the affected row:
- A base of 0 with a negative exponent, and
0raised to0. - A negative base with a fractional exponent. This is exactly the third-root case above:
POWER('Node', 1/3)fails as soon as one row of the node is negative. Guard the base withMAX('Node', 0)or ABS if negatives are possible. - A result too large to represent, which happens quickly with a large base and a large exponent.
Examples
Raising one node to the power of another
This example shows POWER applied row-wise using node A as the base and node B as the exponent. Here the exponent is constant at 2, so the result squares each base value.
Input node: 'Base'
| Year | Value |
|---|---|
| 2025 | 2 |
| 2026 | 3 |
| 2027 | 4.5 |
Input node: 'Exponent'
| Year | Value |
|---|---|
| 2025 | 2 |
| 2026 | 2 |
| 2027 | 2 |
Formula: POWER('Base', 'Exponent')
| Year | POWER Result |
|---|---|
| 2025 | 4 |
| 2026 | 9 |
| 2027 | 20.25 |