Daily DAX : Day 455 ISNUMERIC
DAX ISNUMERIC / ISNUMBER
Both functions do the same thing — Microsoft calls them aliases.
What they do
Returns TRUE if the value is a number, otherwise FALSE.
Syntax
ISNUMERIC ( <value> )
ISNUMBER ( <value> )
You can use either name — result is identical.
Simple examples
ISNUMBER( 42 ) → TRUE
ISNUMBER( 3.14 ) → TRUE
ISNUMBER( -500 ) → TRUE
ISNUMBER( "123" ) → FALSE (it's text)
ISNUMBER( "abc" ) → FALSE
ISNUMBER( BLANK() ) → FALSE
ISNUMBER( TODAY() ) → TRUE (dates are numeric in DAX)
ISNUMBER( 1/1/2025 ) → TRUE
Most common real-world use cases
- Clean dirty imported data (mixed text + numbers)
- Conditional formatting / flags
- Avoid errors in calculations
- Check before conversion
Safe Number =
IF(
ISNUMBER( Sales[Amount Text] ),
VALUE( Sales[Amount Text] ),
BLANK()
)
Is Numeric Flag =
IF( ISNUMBER( Data[Column] ), "Number ✓", "Text / Error ✗" )
Safe Average =
AVERAGEX(
FILTER( Sales, ISNUMBER( Sales[Price] ) ),
Sales[Price]
)
Converted =
IF(
ISNUMBER( 'Table'[Qty as text] ),
VALUE( 'Table'[Qty as text] ) * [Price],
0
)
Important:
• Does NOT work in DirectQuery mode for calculated columns / RLS
• Dates / DateTimes return TRUE (they are stored as numbers)
• Currency & Decimal & Whole Number & DateTime → all return TRUE
• Does NOT work in DirectQuery mode for calculated columns / RLS
• Dates / DateTimes return TRUE (they are stored as numbers)
• Currency & Decimal & Whole Number & DateTime → all return TRUE
Comments
Post a Comment