I am trying to pivot the attached data into a table view for use in AMPL. The data has ~ 2 M rows i.e. 200,000 Home ID's x 10 Facility ID's. I want to pivot to a table with ~ 200,000 rows ( one for each home ID) with 10 Columns ( one for each facility ID) the table should have the Distance in it. Think I have to use the Cross-tab and Transpose tools but not able to get it to work.