Daily DAX : Day 460 ISINTEGER
DAX Function: ISINTEGER
Purpose: Checks if a value is a whole number (integer) → returns TRUE or FALSE
Syntax
ISINTEGER ( <value> )
Parameters
| Parameter | Description |
|---|---|
| <value> | The value to test (can be a number, column reference, expression...) |
Returns
- TRUE → value is a whole number (..., -2, -1, 0, 1, 2, 42, ...)
- FALSE → value has decimal places, is text, blank, etc.
Important: ISINTEGER is just another name for ISINT64.
It checks for whole numbers — not whether the value is numeric in general.
(Use ISNUMBER if you want to check "is this any kind of number?")
It checks for whole numbers — not whether the value is numeric in general.
(Use ISNUMBER if you want to check "is this any kind of number?")
Simple Examples
Direct values:
ISINTEGER( 42 ) → TRUE
ISINTEGER( 0 ) → TRUE
ISINTEGER( -17 ) → TRUE
ISINTEGER( 3.0 ) → TRUE (3.0 is mathematically an integer)
ISINTEGER( 3.1 ) → FALSE
ISINTEGER( "42" ) → FALSE (text is not integer)
ISINTEGER( BLANK() ) → FALSE
Realistic Use Cases
- Validate user-entered quantities (should be whole numbers)
Is Whole Number = IF( ISINTEGER( Sales[Quantity] ), "OK", "Error: must be whole number" ) - Conditional formatting or filtering
Only Integers = CALCULATE( SUM( Sales[Amount] ), FILTER( Sales, ISINTEGER( Sales[DiscountPercent] ) ) ) - Clean data – find rows with decimal values where integer is expected
Has Decimals = IF( NOT ISINTEGER( [YourColumn] ), "Has decimals!", BLANK() ) - Prevent errors in division / modulus operations
Safe Division Result = IF( ISINTEGER( [Divisor] ) && [Divisor] <> 0, [Numerator] / [Divisor], BLANK() )
Quick Comparison Table
| Function | Checks for... | Returns TRUE for... |
|---|---|---|
| ISINTEGER | Whole number (integer) | 42, 0, -5, 3.0 |
| ISNUMBER | Any number | 42, 3.14, -0.001, 5.0 |
| ISBLANK | Blank value | BLANK() |
Comments
Post a Comment