List.LastN(list as list, optional countOrCondition as any) as any


Returns the last item of the list list. If the list is empty, an exception is thrown. This function takes an optional parameter, countOrCondition, to support gathering multiple items or filtering items. countOrCondition can be specified in three ways:

Reference Data

Power Query M Functions / List Functions / List.LastN