It is not possible to create a filter that excludes only initiatives and their children in the Completed/Done status. The filter excludes all Issues in that status.
The filter I use is the following:
issuekey in portfolioChildIssuesOf(XXX) AND status not in (Canceled,SUSPENDED, Done, Completed) AND "InitiativeStatus-cf[Radio Buttons]" not in (Canceled,SUSPENDED) AND issuetype in (Initiative, "Work package", Epic).
The filter would exclude all isssues with status "Done" and "Completed".
The result I want to achieve is to exclude only the initiatives in state of "Done" and "Completed" and their children, leaving Work packages and epics in a "Done" state but with the initiative not yet completed.