Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

[SOLVED] Numbers not added up correctly

David2019
5 - Atom

When I'm adding up several numeric fields, the sum is not always calculated correctly. In certain cases the value is shown as [Null] instead of as the actual sum.

 

To calculate the sum, I use the formula tool:

UnitsVolume_01_2015 + UnitsVolume_02_2015 + ...

 

Both input and output fields are formatted as double.

 

When I export the data to Excel and add up the same fields in Excel, sums are calculated correctly. I can't see any misformatted values, leading/trailing white spaces or any other obvious issues that could explain this odd behavior.

 

Any ideas why the sum could be [Null] instead of the actual value?

3 REPLIES 3
SamDesk
11 - Bolide

Hi @David2019,

 

Do you have some sample data you could upload to help diagnose your issue?

 

Sam :)

jasperlch
12 - Quasar

Hi @David2019 , 

 

If any one the components to be summed (i.e. UnitsVolume_01_2015, UnitsVolume_02_2015, ... ) is Null, the result of the summation is Null because in the formula in Alteryx, 1 + 2 + Null = Null but not 3. In order to ask Alteryx to treat Null as zeros, you could use a Data Cleansing tool to replace Null with 0 for all the fields to be used in your formula (before your Formula tool):

 

Capture.PNG

 

 

David2019
5 - Atom

Yes, already solved it in the meantime, but that was exactly the problem, thanks!

Labels