Table.Last

Table.Last(table as table, optional default as) as any

返回 table 的最后一行,或如果表为空,则返回可选默认值 default

示例:

查找表的最后一行。

使用情况:

Table.Last(Table.FromRecords({[CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"], [CustomerID = 3, Name = "Paul", Phone = "543-7890"]}))

输出:

[CustomerID = 3, Name = "Paul", Phone = "543-7890"]

示例:

查找表 ({}) 的最后一行,或如果为空,则返回 [a = 0, b = 0]。

使用情况:

Table.Last(Table.FromRecords({}), [a = 0, b = 0])

输出:

[a = 0, b = 0]

results matching ""

    No results matching ""