For me, we need to add a level of condition. The easiest way is to add an equation using the result of your previous calculation. Example in Excel syntax :
OCCUR is the number of occurrences previously calculated without rounding
@Bart to my despair in driveworks and not SW. (our US friends didn't realize a lack??).
@Benoit. Not wrong internally, someone has just suggested it to me too. I wanted to avoid but I think I'm not going to have a choice. (it will make me nested IF functions and I'm not a fan)
I'll give you a better answer but if someone finds a simpler solution I'm interested