How to filter and segment purchase orders