Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calculate Total even in some fields have NULL values

TomBock
8 - Asteroid
Hi:
 
I have a data set that contains four numeric fields (double).
 
The example data set includes 18 records where:
a. Record #8 is the single record which contains values across all four fields.  
b. Per a., the calculated field "Total" correctly shows value = 34.
c. However, for the remaining 17 records, I only have a value in either one of the four fields.
d. Per d., the "Total" shows only [Null] as part of the calculation.
 
How should I tweak the formula so that "Total" shows the correct value... regardless how many of the 4 fields are populated?
 
Thank you,
Tom
 
 
 
4 REPLIES 4
MilindG
12 - Quasar

Theres prob better way to do this but see if this works

TomBock
8 - Asteroid

Works like a charm.   Any thoughts as to why the originally posted process did NOT work?   What did I miss?

MilindG
12 - Quasar

@TomBock Ah thats a good question. I believe because your fields have null values hence you cant add. That also got me thinking and heres another much easier way to do is basically turn the null value to empty and then add all the columns

MilindG_0-1682079645450.png

 

TomBock
8 - Asteroid

Excellent alternative!!   Thank you so much for the assistance... I very much appreciate it.

Labels
Top Solution Authors