For NULL value in 'Server Expression' formula gives incorrcet output, but for 0 it is fine.
We are using this formula in server expression:
least(safe_division(abs(nvl(sum(branch_data.actual_quantity),0) - nvl(sum(branch_data.utc_final_fc_m_lag_13),0)), nvl(sum(branch_data.actual_quantity),0),0),1)
our scenario is:
1) when actual_quantity is zero and utc_final_fc_m_lag_13 is any value say 45 then calculation is okay. (output comes 100%)
2) when actual_quantity is NULL and utc_final_fc_m_lag_13 is any value say 45 then calculation is not Okay . (output comes 0% which is incorrect, it should be 100%)
in scenario 2 it gives 0% as output. But it should give 100% as actual quantity is nothing and we have something in utc_final_fc_m_lag_13 so as per correct calculation it should be 100% .