2.4.3 How to Adjust or Override a Previously Calculated Value

In the video for this section (which is great because it explains how the formulas work, btw), using a boolean to tell the system to calculate using a different value is called a "best practice."




Specifically, as I see it, the boolean creates an entire line item full of cells which need to be referenced every time the total is calculated. Wouldn't it be more efficient to change the formula in the "Final Forecast" row to "IF Override Forecast > 0, THEN Override Forecast, ELSE, Initial Forecast"?



  • @jadefortunato 


    To me that basically is an additional check, if only that boolean box is checked by the user then only Override Forecast will be pulled even if Override Forecast line is populated.


    However I have seen many clients who have asked us to do away with such an additional check because of the number of check boxes that they would have to maintain due to multi dimensionality of any calculation module.



  • With the boolean, you have the ability to override with a zero or negative value. The boolean separates the decision whether to override from the value of the override.

  • @jadefortunato, As Michael mentioned already, this Boolean will gives an flexibility to override to zero or negative values. Adding to that point and in general not specific to this example, most of the times it's better to split the IF ELSE nested statements into multiple Boolean line items as it makes them more readable and easy to understand (Auditable as per DISCO). Also Boolean line items take less size as compared to number or text. so size is not a huge concern most of the times and the calculation will also split into multiple line items makes it better from performance pov.

  • As Dikshant mentioned, "it's better to split the IF ELSE nested statements into multiple Boolean line items". Adding to that point, this approach mostly used when 2 or more conditions are to be applied as a filter.