Hello,
There are different string variables from different months of data that I'm trying to pull to create one sheet of data where there aren't duplicate rows of data. When I do this through a case statement or joining data a blank row shows up for where it does not agree. For example, if someone has two different managers in October and November I want the employee to show only one row of data and have an "October Manager" column and a "November Manager" column. I know that when using numbers you can simply sum the info but with string variables it's proving to be more challenging. I've included a picture that will hopefully shed some light on what I'm looking for.
Thanks for any help.
Read the data into SAS. Use retain variables to create retain values on the manager columns (or you could transpose the data, sort not missing, then transpose again. Or in fact merge the non-missing row to non-missing row). Then join the data. Then output again. Plenty of examples on here already on how to line up data. If you provide test data in the form of a datastep of all the relevant datasets, I can supply some code, but not here to type in test data.
Read the data into SAS. Use retain variables to create retain values on the manager columns (or you could transpose the data, sort not missing, then transpose again. Or in fact merge the non-missing row to non-missing row). Then join the data. Then output again. Plenty of examples on here already on how to line up data. If you provide test data in the form of a datastep of all the relevant datasets, I can supply some code, but not here to type in test data.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.