Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have three fields that may sometimes contain null values. When I perform a group by operation in my script with 'Sum(NumberSumX)', the result returns 0 even when the values are null. I want the sum of null values to be null as well.
Here's my current script:
Load
Dimension,
Sum(Number1) as NumberSum1,
Sum(Number2) as NumberSum2,
Sum(Number3) as NumberSum3
From ...
Group By Dimension;
I've seen solutions using a where statement, but they seem to only work with a single field. I'm having trouble adapting it to work with multiple fields. In my case, any of the NumberX fields can be null while the others are not.
How can I modify my script to achieve the desired result?
Clean an elegant as usual !
Many thanks to everybody in this thread