Use case
Return the total of story points added to issues in an epic.
Expression
Create and configure a Smart field using this expression in General parsing mode:
%{sum(fieldValue({issue.cfNNNNN}, issuesUnderEpic()))}
Replace the ID with the one of your 'Story Points' custom field.