List.Sum Function in Power Query
The List.Sum function returns the sum of non-null values in the list. Returns null if there are no non-null values in the list.
Syntax
List.Sum(list as list, optional precision as nullable number) as any
Example: Find the sum of the numbers in the list.
Power Query M
let MyList = {20, 50, 60, 40}, Return = List.Sum(MyList) in Return
The output of the above code is 170.