Say that you have this relationship for your portal:
LayoutTable::__pk = PortalTable::_fk
If you add a second Occurrence of portal table and link it in like this:
PortalTable::_fk = PortalTable2::_fk AND
PortalTable::ItemID = PortalTable2::ItemID
Then Count ( PortalTable2::ItemID ) > 1 can be used as your portal filter expression to identify portal rows where the ItemID is not unique within the current portal's set of related records.