Value.ReplaceType is a Power Query M function that replaces the input value’s type with the provided type. The function returns the input value with its type replaced.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Value.ReplaceType(
value as any,
type as type,
) as any
Description
Replaces the value
‘s type with the provided type
.
Examples
Replace the default type of a record with a more specific type.
// Output: type number
Type.RecordFields(
Value.Type(
Value.ReplaceType(
[Column1 = 123],
type [Column1 = number]
)
)
)[Column1][Type]
Related functions
Other functions related to Value.ReplaceType are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy