Forum Discussion

michelp's avatar
michelp
Frequent Visitor
6 years ago
Solved

Calculated column sum is null

  Hi Folks,   I have a table with 5 decimal columns: - BL1 Sales Amount - BL2 Sales Amount - BL3 Sales Amount - BL4 Sales Amount - BL5 Sales Amount   I Have created a calculated column with...
  • v-diye-msft's avatar
    6 years ago

    Hi michelp 

     

    The + operator is returning a null because the [BL5 Sales Amount] field is null ( number + null = null). This behavior is standard for all operators within PQ (+,-,/,*) and sql. You can override this behavior with List.Sum. List.Sum ignores nulls by definition. 

     

    https://docs.microsoft.com/en-us/powerquery-m/list-sum