Is it an unstored calc on the same table, with index turned off?
You don't have to use a field for this; in a script that value is dynamically available using the function; if you want to display it on a layout, use a merge text with just
But should you use it in a calc field, make sure the field is set to unstored; otherwise the function will be evaluated once, and then never again (which improbably what happened here).
Thank you it solved my problem and educated me.
Thanks for the hint on turning the index off.