I have numerous records, each of which contains two separate broker ID fields (broker_from_id and broker_to_id). I need to generate multiple output files, one for each broker, that should include all records where that broker is included in either of those two broker ID fields.
I know that I can use the settings at the bottom of the Output Data tool to produce separate output files based upon the values within a single field, but I'm struggling with how to use two fields.
Thanks in advance.
Example Dataset:
| record_id | broker_from_id | broker_to_id |
| 1 | BrokerA | BrokerB |
| 2 | BrokerA | BrokerC |
| 3 | BrokerB | BrokerA |
| 4 | BrokerC | BrokerA |
| 5 | BrokerA | BrokerC |
| 6 | BrokerC | BrokerB |
Required Output Files:
BrokerA.xlsx
| record_id | broker_from_id | broker_to_id |
| 1 | BrokerA | BrokerB |
| 2 | BrokerA | BrokerC |
| 3 | BrokerB | BrokerA |
| 4 | BrokerC | BrokerA |
| 5 | BrokerA | BrokerC |
BrokerB.xlsx
| record_id | broker_from_id | broker_to_id |
| 1 | BrokerA | BrokerB |
| 3 | BrokerB | BrokerA |
| 6 | BrokerC | BrokerB |
BrokerC.xlsx
| record_id | broker_from_id | broker_to_id |
| 2 | BrokerA | BrokerC |
| 4 | BrokerC | BrokerA |
| 5 | BrokerA | BrokerC |
| 6 | BrokerC | BrokerB |