I need a KQL function
which calculates the power of tens (or maybe N), where I can pass the base and the exponent and get back the result.
I´m new in KQL, so I don´t know how exactly define the function and how to implement some sort of for-loop
. Can someone help me out?
You could create a powerN
function and use the range
operator to loop over it, like this:
let powerN = (base: real, exponent: int) {
exp(log(base) * exponent)
};
range x from 1 to 10 step 1
| project powerN(10, x)
Result: