Calculated member that filters Epics which contains a parent

Hi everyone, would you help me to fix this issue. I wish to create a calculated member that returns only epics which contains the issuetype Macrotema as parent.

Here’s what’ve done so far:

Added that below on the advanced scripts:

[jira.customfield_macrotema]
name = "Link Macrotema"
outward_link = "part of macrotema"
issue_type = "Macrotema"
dimension = true

and tried the following code:

Aggregate(
  Filter(
    [Issue].[Issue].Members,
    [Measures].[Issue type] = "Epic"
    AND
    [Measures].[Issues created] > 0 
    AND
    Not IsEmpty([Link Macrotema].CurrentMember)
  )
)

Unsuccessfully so far… I keep getting “Aggregation is not supported over a list with more than 10000 predicates” or “No data found”