Value.ReplaceType

Changes the data type of the value to the specified type.

Syntax

Value.ReplaceType(value as any, type as type) as any

About

Changes the data type of the value to the specified type.

Explanation

Update the record's default type to a more specific type by using Power Query MType. RecordFields with a simple code snippet. This code snippet specifically replaces the type of 'Column1' from a generic type to a more defined 'number' type. The output will show that 'Column1' is now of type 'number'.