Soft Recurrence as an arguments of the Min()

Solved3.86K viewsFormulas and Functions

Hi all,

Recursive computing is one of the strong properties of QM. However, I found that the Min() function incorrectly makes calculations, if its arguments are recursive expressions. If this is a bug in the program code, it would be nice to have the development team took care of it. If this is not an error code, then what has been done wrong in the attached model. Your valuable explanations are very welcome.

Answered question

I logged an IDBS case in 2016 and after 19 months of silence was finally told of a workaround for this bug. It’s a hack, but it works. I’m posting it here publicly in case anyone else runs into this problem.
In a formula min(3.35, B1:Month[~PREV] + 0.5), in the first Month, the bug causes the min function to fail completely, such that the result is 3.35 , when in fact the formula should evaluate as min(3.35, 0 + 0.5) = 0.5
The workaround provided by IDBS is to modify the formula to:
min(3.35, if(isblank(B1:Month[~PREV])=1,0.5,B1:Month[~PREV] + 0.5))
In other words, use a if(isblank()) test to separate the first Month from the remaining months. This defeats the whole point of using an ~ to write a single elegant formula covering an entire series.

Answered question
You are viewing 1 out of 2 answers, click here to view all answers.