Hello, I am a frequently perform one to many merges without any trouble, I'm really confused why this current attempt isn't working correctly. I have two data sets (Taxrate17B and AllRat17) and I'm trying to match them on 4 variables (Pol_unit, Levy_Name, LevyYear, and GrossRate). One data set (Allrat17) includes three additional variables (Resagrate, CommIndRate, and qual). The second data set contains two additional variables (code & voted). My end goal is a data set where each observation for all ten variables. There is no missing data. This is the language I'm using: Data TaxRate17B; set work.TaxRate17B; Proc sort; by pol_unit Levy_Name LevyYear GrossRate; Data Allrat17; set work.Allrat17; Proc sort; by pol_unit Levy_Name LevyYear GrossRate ; Data SchoolRate17; Merge AllRat17 TaxRate17B; by pol_unit Levy_Name LevyYear GrossRate; Run; My result is SchoolRate17 in the first photo. I'm really at a loss why the merge is working well for some observations (see lines 3,4,5,8,11, and 12) but not the others. For some observations, the LevyYear is '.' but I don't think that's the problem. Any suggestions are appreciated! Thank you.
... View more