Updated on

Number.IsNaN is a Power Query M function that checks if a given value is NaN (Not a Number). The function returns true if the input number is equivalent to NaN, and false otherwise.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


Number.IsNaN( number as number ) as logical


Indicates if the value is NaN (Not a number). Returns true if number is equivalent to Number.IsNaN, false otherwise.


Check if 0 divided by 0 is NaN.

// Output: true
Number.IsNaN( 0/0 )

Check if 1 divided by 0 is NaN.

// Output: false
Number.IsNaN( 1/0 )

Other functions related to Number.IsNaN are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: