one possible solution could be to add 2 custom fields on item. Initially you can fill in these fields via item import or scripting or mass update (semi manual). For new items these fields could automatically populate according selected income/expense account. Afterwards you can extracts these fields in a saved search.