Type.NonNullable

Type

Returns the non-nullable version of a type, stripping the nullable wrapper if present.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Type.NonNullable(type as type) as type

Parameters

NameTypeRequiredDescription
typetypeYesThe type to unwrap. If it is already non-nullable, it is returned as-is.

Return Value

typeThe non-nullable form of the given type.

Remarks

Type.NonNullable strips the nullable wrapper from a type, returning the underlying non-nullable type. If the input is type nullable X, the result is type X. If the input is already non-nullable, it is returned unchanged — the function is idempotent on non-nullable types.

Making a type nullable goes in the other direction using the nullable keyword in a type expression (e.g., type nullable number). There is no dedicated Type.Nullable function — Type.NonNullable is a one-way stripping operation.

Common use cases for Type.NonNullable include:

- Type normalization: comparing two types for equivalence after stripping nullable wrappers, since type number and type nullable number are distinct values - Generic transforms: building functions that work on the base type regardless of whether the input type is nullable - Schema inspection: reducing column types from data sources (which often return nullable types) to their base kind for comparison

Use Type.IsNullable to check whether stripping is needed before calling Type.NonNullable, if you want to avoid unnecessary calls.

Examples

Example 1: Strip nullable wrapper from nullable number

Type.NonNullable(type nullable number)
Result
Result
1type number

Example 2: Non-nullable type is returned unchanged

Type.NonNullable(type text)
Result
Result
1type text

Example 3: Verify NonNullable of nullable equals the base type

Type.NonNullable(type nullable number) = type number
Result
Result
1TRUE

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks