Table.Keys
Table.Keys(table as table) as list
Devuelve las claves de la tabla especificada.
Obtenga la lista de claves de una tabla.
Uso
let
table = Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
}),
tableWithKeys = Table.AddKey(table, {"Id"}, true),
keys = Table.Keys(tableWithKeys)
in
keys
Salida
{[Columns = {"Id"}, Primary = true]}