You are viewing our older product's guide. Click here for the documentation of GoodData Cloud, our latest and most advanced product.
POWER
The POWER function returns a number raised to the base specified as the second parameter of the POWER function (e.g., Interest rate, Revenue). Complex and undefined results are replaced with NULL.
The POWER function has the following format:
POWER(n, b)
The base n and the exponent b accept any numeric data, including metrics, metric expressions, and constants.
For fractional exponent (b) values, using fractions (for example, 1/2) rather than decimals (for example, 0.5) improves performance.
Syntax
POWER(…,…)
POWER(number, power)
Examples
SELECT POWER(10, 1/12)
SELECT POWER(SUM(Amount), 2)
SELECT POWER(1, SUM(Amount))
SELECT POWER(Total_Amount * (1/2), Total_Amount)