The calcaution is designed to work when individual Sprints are on report rows and compares the selected sprint name on report rows with the sprint names for each issue.
If you use vacated members in the Sprint dimension or board level, then you might use a more universal expression:
Sum(
--set of issues
Filter(
--iterate through Parent issues except for Sub-tasks
Descendants([Issue.Sub-task].CurrentHierarchyMember,[Issue.Sub-task].[Parent]),
[Measures].[Issue type] NOT MATCHES "Sub-task"
),
CASE WHEN --issue was in Sprint at Closing but had no SP
[Measures].[Sprint issues at closing] > 0 AND
IsEmpty([Measures].[Sprint Story Points at closing])
THEN --count parent issue
1
END
)
Let me know how this works for you.
Kind regards,