Daily DAX : Day 389 ISNUMBER

Power BI DAX: ISNUMBER Function

Syntax

ISNUMBER(<value>)

Description

The ISNUMBER function checks whether a given value is a number (of numeric data type). It returns TRUE if the value is a number, and FALSE otherwise.

This function is useful for data validation, filtering non-numeric entries, or conditional logic in calculated columns and measures.

Parameters

  • <value>: Any DAX expression that returns a scalar value (e.g., a column reference, literal, or calculation).

Return Value

TRUE or FALSE (Boolean)

Use Case Example

Scenario: You have a column SalesAmountText that contains mixed data — some numeric strings like "100", some actual numbers, and some text like "N/A". You want to create a calculated column that flags only true numeric values.

DAX Formula:

IsValidNumber = IF(ISNUMBER('Table'[SalesAmountText]), 'Table'[SalesAmountText], BLANK())

Alternative (for text that looks like numbers):

IsNumericText = IF(ISNUMBER(VALUE('Table'[SalesAmountText])), TRUE, FALSE)

Note: Use VALUE() with ISERROR to safely test text that should be convertible to numbers.

Common Use Cases

  • Filtering out invalid numeric entries in imported data.
  • Creating conditional calculations only on valid numbers.
  • Data cleansing in calculated columns.
  • Validating user input or external data sources.

Important Notes

  • ISNUMBER checks the data type, not whether text looks like a number.
  • For text like "123", ISNUMBER("123") returns FALSE. Use ISERROR(VALUE(...)) to test convertibility.
  • Blank values return FALSE.

Comments