Skip to Main Content
AVEVA Product Feedback


Status Declined
Created by Guest
Created on Aug 20, 2022

Allow Failed Calculations to Output a Value Rather Than 'Calc Failed'

As an AF Asset Analytics user, I would like there to be an option to output a value rather than 'Calc Failed' if an analysis fails to evaluate.  I have several aggregate analyses which are dependent on other analyses (which will occasionally fail (which I expect)). When these lower level analyses fail, I would like to have the option of setting the output of the failed analysis to 0 (or some other value), so that the higher level analysis may continue to function properly (instead of failing as well).
  • ADMIN RESPONSE
    Aug 20, 2022
    A built in bad value (calc failed) replacement would need to cover all possible use cases and would be cumbersome if different replacements are needed per analysis. As previously pointed out, our recommendation is to use the builtin BadVal() function for your needs.
  • Attach files
  • Guest
    Reply
    |
    Aug 20, 2022
    Agreed, similar to the iferror function in excel. You could nest another calculation or some value. We have many analyses like this when we are calculating efficiencies (just to give one example). If you have a zero in the denominator, it fails. This is expected sometimes, and so we end up having to determine every expected scenario that ends in calc failed and nest if functions to deal with them.
  • Guest
    Reply
    |
    Aug 20, 2022
    Have you tried running a BadVal check on the variable that is mapped to the output attribute? Instead of mapping the variable with the final step of the calculation (e.g., a variable named Final) to the output attribute, you could add one more variable that runs the test: If BadVal(Final) Then 0 Else Final, and map this result to the output. This is similar to wrapping a result in Excel in the IfError function.