Number.Log

This function calculates the logarithm of a given number to a specific base. If the base is not provided, the default value used is Number.E. If the number is null, the function will return null.

Syntax

Number.Log(number as nullable number, optional base as nullable number) as nullable number

About

This function calculates the logarithm of a given number to a specific base. If the base is not provided, the default value used is Number.E. If the number is null, the function will return null.

Explanation

Calculate the logarithm of 2 to the base 10 using the Power Query M function Number.Log(2, 10) to output 0.3010299956639812. Calculate the natural logarithm of 2 using the Power Query M function Number.Log(2) to output 0.69314718055994529.