Search for assembly items whose component's custom field is x or y. Group the search result by internal id. Add 2 summary criteria formula where both compare the sum to be greater than 1. 1 formula should equal 1 when the custom field is x and 0 otherwise. The other formula does the same thing with value y.