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:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation:
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.