Type.AddTableKey
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.
Add a key to a table type.
Type.AddTableKey (table as type, columns as list, isPrimary as logical) as type
| Argument | Description |
|---|---|
| table | The table type to modify. |
| columns | Columns that define the key. |
| isPrimary | Logical stating whether or not it is the primary key. |
Type.AddTableKey(tableType, {"A", "B"}, false) equals add a non-primary key that combines values from columns A and B
Show: