Hello everyone. I found firm expenditure data that I was attempting to merge into one master document, but I am having issues along the way. There are multiple documents containing order numbers "PONumber", but the a few issues I have which I am unable to circumvent. The datasets are unbalanced, there are repeating time values from a firm making multiple purchases within the same month in dataset 1, and while dataset 2 has no time determinant. I cut the code short but the months run across a three year period.
Dataset 1:
Dataset 2
Every order number in dataset 1 is in dataset 2, but when I attempt to merge m:1, m:m, and 1:1 by the order number I continue to receive "variable PONumber does not uniquely identify observations in the master data". Is there a way I can pair the corresponding Material Number from dataset 2 into dataset 1's orders?
Dataset 1:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long PONumber str7 Month 6939958 "2014-01" 7012089 "2014-01" 7015553 "2014-01" 7031109 "2014-01" 7036141 "2014-01" 7039713 "2014-01" 7051564 "2014-01" 7051564 "2014-01" 7054862 "2014-01" 7054955 "2014-01" 7054955 "2014-01"
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(PONumber MaterialNo) 6939958 408957 7012089 408957 7015553 408957 7031109 824624 7036141 754692 7039713 754692 7051564 824624 7051564 824624 7054862 408957 7054955 754692 7054955 754692
Comment