04-27-2016 11:10 AM
04-27-2016 11:24 AM
This is a SAS forum, not an Excel one? Has your data been imported to SAS? If so can you show an example in the form of a datastep. AS for the code once you have it in SAS then that is pretty easy:
proc sql; create table WANT as select month(YOUR_DATE) as MON, count(PERSON) as NUMBER_OF_PEOPLE from HAVE group by month(YOUR_DATE); quit;
Without seeing some test data and required output I am just guessing though (and no, I don't download Excel files).
04-27-2016 01:01 PM
@Arpitgt Welcome to SAS.
Your question isn't clear as to what you need help with.
Depending on what you're trying to do, there's a lot of options. Are you having trouble importing the data, or calculating your measure of how many people each month took insurance?
Also, many people here do not download Excel files, so it's best to post your data in your question, a small sample at any rate.
05-03-2016 05:52 AM
I am having trouble to calculate how many people each month took insurance?
Below is the data for first 22 days in january. Remaining data is same as below for every month :-
05-03-2016 06:05 AM
That would need some clarification,
What type is date, as 1/1 is not a date. Is it a SAS numeric date variable, i.e. 01JAN2016 for example? Is no_of_births a numeric variable? For example:
data have; date="01JAN2016"d; no_of_births=1482; output; date="02JAN2016"d; no_of_births=1213; output; run; proc sql; create table WANT as select distinct month(DATE) as MON, sum(NO_OF_BIRTHS) as NUMBER_OF_BIRTHS from HAVE group by month(DATE); quit;