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
| Parameter | Type | Description |
|---|---|---|
number | nullable number | The number to work on; null gives null. |
base | nullable 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
- Without a base it gives the same as
Number.Ln; to base 10,Number.Log10is shorter.
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