Syntax
Table.AddKey(table as table, columns as list, isPrimary as logical) as table
Description
Add a key to table, given columns is the subset of table’s column names that defines the key, and isPrimary specifies whether the key is primary.
Reference Data
https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference