I have a dataset looking something like this:
|Customer||From date||To date||Premium||New||Exit||Date_new||Date_exit|
It shows the Insurance Premium for each customer. A flag is used to indicate whether the Premium is new or the custmer is leaving (exit).
I would like to create a Crosstab in SAS VA with to columns with sum of Premium New and Premium exit for each year/month:
|Premium new||Premium exit|
I have created a New calculated item:
It says: IF (EXIT = 1) RETURN PREMIUM else Missing. And equivalent for New Premium.
Is there a way in SA VA that I can "merge" the two date columns (date_new and date_exit) from my dataset into one date column in SAS VA (Version 7.4)? Or do I have to further prepare my data using SAS code?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.