List.Last

 

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 the last set of items in the list by specifying how many items to return or a qualifying condition provided by countOrCondition.

List.Last(list as list, optional defaultValue as any) as any  

ArgumentDescription
listThe List to check.
optional defaultValueDefault value if list is empty.
  • If a number is specified, up to that many items are returned.

  • If a condition is specified, all items are returned that initially meet the condition. Once an item fails the condition, no further items are considered.

List.Last({1, 2, 3}) equals 3  

Show: