Welcome to the eazyBI community!
Creating an MDX calculation in the Issue dimension to aggregate issues by a part of Epic’s summary together with its children and parents would be a very slow and complex thing to do.
The settings for such a custom field would be:
name = "E2E Epics"
data_type = "string"
dimension = true
update_from_issue_key = "epic_key"
(You can give another technical and visible field name for the field).
After importing the custom field, add this dimension in Pages and filter by value E2E (or Yes, regarding what the values this custom field have in your case): if you use Portfolio hierarchy, epics automatically will be grouped by their parents (even if they do not have this value), while children will be filtered because the epics value was passed down.
There are similar conversations about passing down epic field value, for instance, Count Issues in Sprint Where Parent Epic's Custom Field = x.
Ilze / firstname.lastname@example.org