Table.PromoteHeaders
The function promotes the values in the first row to be used as column headers. Only text or number values are allowed as column headers by default. There are two valid options: 1. PromoteAllScalars...
The function promotes the values in the first row to be used as column headers. Only text or number values are allowed as column headers by default.
There are two valid options:
1. PromoteAllScalars: When set to true, all scalar values in the first row will be used as column headers according to the specified Culture or the document's locale. If a value cannot be converted to text, a default column name will be used.
2. Culture: Specifies the culture for the data by providing a culture name.
Set the initial row of values in the table as headers using Power Query MTable.PromoteHeaders function.
For example, if the table includes columns for CustomerID, Name, and Date with their respective values, running this function will convert the first row of values into headers such as CustomerID, Name, and Date with the corresponding values filled in.
Similarly, to convert all scalar values in the first row of the table to headers, utilize the Power Query MTable.PromoteHeaders function with the PromoteAllScalars parameter set to true and specify the desired culture. This function transforms the scalar values in the first row of the table into headers, ensuring a clear representation of the data.