log
Description
Returns the logarithm of a number to a specified base. Common uses include modeling compound interest, exponential growth or decay, pH levels, and earthquake magnitudes.
Syntax
Like many functions in DataPrime, log
supports two notations, function and method notation. These interchangeable forms allow flexibility in how you structure expressions.
Arguments
Name | Type | Required | Description |
---|---|---|---|
base | number | true | The logarithmic base (e.g. 2 for log base 2) |
number | number | true | The value whose logarithm will be computed |
Example
Description
Use case: Compute a log base 2 transformation
Calculate the log base 2 of a numerical field and store the result in a new field.
Example query
Example output
Theme
Light