Watch, Follow, &
Connect with Us

Developer Tools Community.

Welcome, Guest
Guest Settings

 This question is answered.

Replies: 3 - Last Post: May 21, 2017 9:47 PM Last Post By: Jeff Overcash (... Threads: [ Previous | Next ]
 Posts: 143 Registered: 4/30/09
 Caculated Frld Posted: May 20, 2017 5:43 AM I have a Balance Calc.Field (Numeric ) it is formula is (Debit-Credit) but when debit and/or credit is null then balance field seems Null , i want to see the balance 0 (zero) Thank you
 Posts: 1,529 Registered: 9/23/99
Re: Caculated Frld
Posted: May 20, 2017 12:55 PM   in response to: Melissa Torn
Melissa Torn wrote:
I have a Balance Calc.Field (Numeric )
it is formula is (Debit-Credit) but when debit
and/or credit is null then balance field seems
Null , i want to see the balance 0 (zero)

Thank you

Use a case statement something like

"T4" COMPUTED BY (case when (t1 is null) or (t2 is null) then 0.0 else t1 /
t2 end)

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
 Posts: 143 Registered: 4/30/09
 Re: Caculated Frld Posted: May 20, 2017 9:40 PM   in response to: Jeff Overcash (... Thank you so much Jeff
 Posts: 1,529 Registered: 9/23/99
 Re: Caculated Frld Posted: May 21, 2017 9:47 PM   in response to: Melissa Torn Melissa Torn wrote: Thank you so much Jeff Note you probably need one more WHEN checking for the divisor being 0 or add an additional or (t2 = 0) in the first WHEN clause to make sure you don't have division by zero errors. -- Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) Learning is finding out what you already know. Doing is demonstrating that you know it. Teaching is reminding others that they know it as well as you. We are all leaners, doers, teachers. (R Bach)
Legend