I have subquery that totals misc charges for an invoice. If there are no misc charges on the invoice, then I get a blank field which does not allow me to do a formula for that invoice for grand totals.
Right now I just have a calculated field that says: MiscTotal = sum (InvcMisc.MiscCharge)
I need to enhance this to return a zero when there are no misc charges on the invoice. I’m in E10 (10.600)
Any help would be appreciated. I’ve tried the ISNULL, but I don’t think I set it up right or I need to go another way.
Coalesce works here too. Not sure what will give the better performance, you may want to test both and see which query plan is better. I’m hosted or I’d check for ya
sum (coalesce(InvcMisc.MiscCharge,0))
That will set every null it encounters to 0 then do the sum.
(This is presuming you are doing this in SQL query, please ignore if incorrect)