Skip to main content
Question

Handling nulls in MDA calculated fields


dale_parent
I have a use case to treat nulls as zero on a calculated field in MDA.  It's simply A-B=C and in 25% of cases B is null.  In those cases I would like to end up with C=A but there doesn't seem to be an option to treat null as zero in MDA calculated fields.  Is this feature on a roadmap by any chance?
It's also worth mentioning in this data set the nulls in B need to stay null for downstream logic.

3 replies

pele
Forum|alt.badge.img+3
  • Helper ⭐️⭐️⭐️
  • 164 replies
  • October 18, 2018
Hi Dale, 

Pretty sure you can get to this by using the Advanced Formula option for your calculated field. I think something like the following should work:

case when B is null then A else A-B end

Hope this helps!

Cheers,
Pele

sai_ram
Forum|alt.badge.img+1
  • Expert ⭐️⭐️
  • 3727 replies
  • November 16, 2018
Hi Dale,

 

Could you please use the default value option. It can be done while creating the field or we can edit the field and add the default value. 

 

 


dale_parent
  • Author
  • Helper ⭐️
  • 37 replies
  • November 19, 2018
Hi Sai Ram,

While the default value option is a great solve for some cases I can't use it in this case. The null value indicates a unique condition we use to trigger a specific customer communication workflow, while a zero value indicates a reporting error in need of attention internally. The advanced formula does what we need for these conditions.

Thanks to both of you for your helpful suggestions


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings