RTF values not summing up
I have been trying to calculate the sum of values group by specific element and person number in the RTF template, but unfortunately, I have been unable to achieve the desired result. It seems that the formula or function I am using is not working correctly.
1st formula i used
<?if:REPORTING_NAME = 'FIT Gross'?>
<?sum(RUN)?>
<?end if?>
Output: -- the person has 2 FIT Gross, my expected output is 15497.72 but it is showing as 2 record.
FIT Gross
11267.72
4230.8
2nd formula i used
<?sum(//RUN[../REPORTING_NAME = 'FIT Gross'])?>
Output: --it is adding all FIT Gross including other persons FIT Gross, my expected output is 15497.72, sum of 11267.72 and 4230.8.