Math Functions
Math functions allow you to perform mathematical operations and calculations on numeric data.
Int
Rounds the input number down to the largest integer of equal or lesser value.
Category: math
Syntax:
Int([number_column])
Returns: IntColumn
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
number |
number\|column |
✓ Yes | The number to be rounded down. |
Allowed Column Types: INT, FLOAT, DECIMAL
Validation
- Minimum parameters: 1
- Maximum parameters: 1
Examples
Int(3.6)
Rounds down to largest integer.
Result: 3
Int(-3.2)
Rounds down negative number.
Result: -4
Int([Cost])
Returns the Int for each row in the input column.
Related Functions
- Sqrt - Calculate square root of a number
- Sign - Determine if a number is positive, negative, or zero
IsEven
Returns True if the integer is even, False if it is odd.
Category: math
Syntax:
IsEven([number_column])
Returns: BooleanColumn
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
integer\|column |
✓ Yes | The number or column of numbers to test. |
Allowed Column Types: INT
Validation
- Minimum parameters: 1
- Maximum parameters: 1
Examples
IsEven(2)
Tests whether 2 is even.
Result: true
IsEven(3)
Tests whether 3 is even.
Result: false
Related Functions
- IsOdd - Test if a number is odd
IsOdd
Returns True if the integer is odd, False if it is even.
Category: math
Syntax:
IsOdd([number_column])
Returns: BooleanColumn
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
integer\|column |
✓ Yes | The number or column of numbers to test. |
Allowed Column Types: INT
Validation
- Minimum parameters: 1
- Maximum parameters: 1
Examples
IsOdd(2)
Tests whether 2 is odd.
Result: false
IsOdd(3)
Tests whether 3 is odd.
Result: true
Related Functions
- IsEven - Test if a number is even
Sign
Returns the sign of a number: -1 if negative, 1 if positive, 0 if zero.
Category: math
Syntax:
Sign([number_column])
Returns: IntColumn
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
number |
number\|column |
✓ Yes | The number or column of numbers to return the sign of. |
Allowed Column Types: INT, FLOAT, DECIMAL
Validation
- Minimum parameters: 1
- Maximum parameters: 1
Examples
Sign(-3)
Returns -1 for negative numbers.
Result: -1
Sign(3745)
Returns 1 for positive numbers.
Result: 1
Sign(0)
Returns 0 for zero.
Result: 0
Related Functions
- Int - Round down to nearest integer
Sqrt
Compute the positive square root of a positive number.
Category: math
Syntax:
Sqrt([number_column])
Returns: FloatColumn
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
number |
number\|column |
✓ Yes | The number or column of numbers to compute the square root of. |
Allowed Column Types: INT, FLOAT, DECIMAL
Validation
- Minimum parameters: 1
- Maximum parameters: 1
Examples
Sqrt(9)
Square root of 9.
Result: 3
Sqrt(16)
Square root of 16.
Result: 4
Sqrt([Value])
Square root for each value in the column.