Table.ColumnsOfType
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a list with the names of the columns that match the specified types.
Table.ColumnsOfType(table as table, listOfTypes as list) as list
| Argument | Description |
|---|---|
| Table | The input table. |
| listOfTypes | The types to match columns types on. |
let
tableValue = Table.FromRecords({[a=1, b="hello"]}, type table[a=Number.Type, b=Text.Type])
in
Table.ColumnsOfType(tableValue, {type number})
equals {"a"}
Show: