Function: sum(round(numbers('yxr') if minus(numbers('yxr'), numbers("xxx")) > numbers("xxx") else mean(minus(numbers('yxr'), numbers("xxx")), numbers('yxr')), mean(minus(numbers('yxr'), numbers("xxx")), numbers('yxr'))), mean(minus(numbers('yxr'), numbers("xxx")), numbers('yxr')) if minus(numbers('yxr'), numbers("xxx")) > numbers('yxr') else numbers("xxx"))