This issue is discussed here: Addition of calculated Program Rule Variables concatenates values instead of adding - #5 by Gassim
on Jira here: [DHIS2-12029] - Jira
The community post shows my work around. Otherwise you could upgrade to a version of DHIS2 where this bug is fixed.
Best,
Kayla