Table.TransformColumnTypes

The function retrieves a table from the input table by performing a transformation operation on the columns specified in the parameter typeTransformations (format: {column name, type name}), with the ...

Syntax

Table.TransformColumnTypes(table as table, typeTransformations as list, optional culture as nullable text) as table

About

The function retrieves a table from the input table by performing a transformation operation on the columns specified in the parameter typeTransformations (format: {column name, type name}), with the optional parameter culture specifying the desired culture (e.g., "en-US"). If a specified column does not exist, an exception will be triggered.

Explanation

Convert the numerical values in column [a] to text values based on the corresponding values specified in the table {[a = 1, b = 2], [a = 3, b = 4]}. This can be achieved using Power Query MTable.TransformColumnTypes function. By specifying the type as text and language as "en-US" for column 'a', the values will be transformed accordingly. The output will display the updated table with column [a] now containing text values while column b remains unchanged.