Newtyne News

Part 1 and 2: Working with Dates and Understanding Merges

Attending a course can teach you a lot about what you need to know. However, learning the why or how requires expert input.

In this SAS QUICK TIPS guide, Kris – one of Newtyne’s Training Specialists, highlights key aspects of working with dates and combining/merging data in SAS to help you enhance your code and optimise the output.

So, do you want to go from being a good SAS programmer to a great SAS Programmer? This is essential reading for every successful Data Analyst.

Part 1 – Dates

Have you ever had to pick up someone else’s code and produce trend analysis of key metrics across a time period and wondered why you were not getting the output you expected?

Getting a date variable right in SAS ensures accurate results for summary statistics required to support business decision making. A date variable needs to be stored correctly, with a suitable format applied and the name needs to be accurate.

Not making assumptions is a great start but being aware of the pitfalls is even better. Here, Kris explores three key aspects to working with dates and provides simple suggestions to ensure you avoid running into common problems.

Girl studying on bed with earphones computer data

Part 2 – Merges

Have you encountered lost or duplicated data when merging data sources together? Do you really know your left from your right? Sounds simple, but the impact of getting it wrong can have significant consequences on your output.

For example, merging datasets using the wrong joining technique can result in a loss of valuable data that can push a project’s timelines back months, if you don’t spot it early enough.

Experience of data merges in one language, such as SQL, doesn’t mean that you would automatically know how to merge data in the language of SAS. The world of merges appears quite complex and tricky, so understanding the ‘how‘ is even more important.

Getting your head around naming conventions, conditional logic and the IN= ‘dataset’ option improves your coding and ensures a successful output. Here Kris provides example SAS code for the most common SQL join methods as well as some of those less common.

This SAS QUICK TIPS guide will give you all you need to know to successfully navigate the above.


About Kris:

Kris Adams has been working with SAS in both Pharma and Finance (Credit Risk) sectors and is an experienced and highly skilled Data Analyst. Working in the field on a wide range of technical projects alongside writing and delivering not only SAS Language courses from the basics to statistical analysis but also adding to his skills with python. Creating both our Python course,  Python for SAS Programmers – a unique offering for those with SAS skills wishing to learn Python, and Python for Data Analysts – for those new to python wanting to learn new skills. 

Man smiling looking at computer Hands with pencils writing