List.Max Function in Power Query

The List.Max function returns the maximum item in a list, or the optional default value if the list is empty.

Syntax

List.Max(list as list, optional default as any, optional comparisonCriteria as any, optional includeNulls as nullable logical) as any

Example: Find the max in the input list.

Power Query M

let
    Source = List.Max({100, 400, 700, 300, -200, 500})
in
    Source
 

The output of the above code is 700.

List.Numbers function in Power Query

Example: Generate a list of 10 numbers starting at 3, with an increment of 5 for each subsequent number.

Power Query M

let
  source = List.Numbers(3, 10, 5)
in
  source   

The output of the above code is shown below:

List.Numbers function in Power Query