Forum Discussion
Calculated column sum is null
- 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
michelp ,
Create measure to get the sum.
michelp ,
I have one doubt why you wanna sum [BL6 Sales Amount] again with all 5 sales amount?
Instead of using your below statement use the NEw Total Sum.
New Total Sum = Value6+Value6
This also gives you same result like [BL1 Sales Amount] + [BL2 Sales Amount] + [BL3 Sales Amount] + [BL4 Sales Amount] + [BL5 Sales Amount] + [BL6 Sales Amount]
Don't forget to hit Thumbs up and accept this as a solution if you find it helpful!