Excerpt |
---|
Computes the logarithm of the first argument with a base of the second argument. |
- First argument can be a Decimal or Integer literal or a reference to a column containing numeric values.
- Second argument, the base, must be an Integer value or column reference.
Numeric literal example:
D code |
---|
derive type:single value: LOG(49, 7) |
Output: Generates a column containing the value of 7x = 49, which evaluates to 2
.
Column reference example:
D code |
---|
derive type:single value: LOG(MyValue, 5) as: 'log_MyValue' |
Output: Generates the new log_MyValue
column containing the exponent that raises 5 to yield the MyValue
column.
D code |
---|
derive type:single value: LOG(result_numeric_value, base_numeric_value) |
Argument | Required? | Data Type | Description |
---|
result_numeric_value | Y | string, decimal, or integer | Name of column or Decimal or Integer literal that is generated by the LOG function |
base_numeric_value | Y | string, decimal, or integer | Name of column or Decimal or Integer literal that serves as the base for computing the LOG function |
result_numeric_value
Name of the column or numeric literal. Value must be greater than 0.
- Missing input values generate missing results.
- Literal numeric values should not be quoted. Quoted values are treated as strings.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String (column reference) or Integer or Decimal literal | 49 |
base_numeric_value
Name of the column or Integer literal that is used for the exponential calculation.
Info |
---|
NOTE: This base value must be a positive integer.If this value is not specified, 10 is used as the base value. |
- Missing input values generate missing results.
- Literal numeric values should not be quoted. Quoted values are treated as strings.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
No | String (column reference) or Integer or Decimal literal | 7 |
Example - Exponential functions
Include Page |
---|
| EXAMPLE - Exponentional Functions |
---|
| EXAMPLE - Exponentional Functions |
---|
|