You have to make a Sub-Query, then supply in the Sub-Query SubQuery Criteria, then instead of using it in your Main Query as a JOIN, you can use it in a Calculated field with {SubQueryNameHere}
Epicor will then insert that Sub-Query as a Sub-Select into that field wherever {SubQueryNameHere} is used, you can even use it in Expressions on JOINs etc…