OpenBI Docs Buy

Number.Log

The logarithm of a number to a base you choose; to base e without one.

Group: Number. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Number.Log(number as nullable number, optional base as nullable number) as nullable number
ParameterTypeDescription
numbernullable numberThe number to work on; null gives null.
basenullable number
optional
The base; e, the natural logarithm, when left out.

Returns

nullable number. The power the base must be raised to for the number; null for null.

Remarks

Examples

Base 2

How many times 1 must double to reach 1024.

Number.Log(1024, 2)
10

Without a base

Number.Round(Number.Log(2), 4)
0.6931

Number.Ln, Number.Log10, Number.Power.

Last updated · OpenBI Studio 0.3.79