List.Sum

This function calculates the total of all non-empty values in the list provided as input. If the list contains only empty values, the function returns a null value.

Syntax

List.Sum(list as list, optional precision as nullable number) as any

About

This function calculates the total of all non-empty values in the list provided as input. If the list contains only empty values, the function returns a null value.

Explanation

Calculate the total of the numbers in the set {1, 2, 3} by using the Power Query function MList.Sum({1, 2, 3}). The result will be 6.