01-04-2012 02:10 AM
I have a two data set named dataset1 and dataset2 and want to create output like the one in attached excel workbook Test sheet name output
Both the dataset are in same format as in excel sheet attached.
Could anyone help me with SAS code or macro to create dataset as the one in output sheet
All the variable except central are created using dataset1 and counting region for example
create table NEW AS
SELECT region,COUNT(region)AS _61OMP from perf.input
WHERE region="Kundelinjen (Ledelse & stab)"
and fejltype="3829 RD BACO" and fejltekst="Sag sendt for sent ind"
GROUP BY REGION, fejltype,fejltekst ;
output files has all the conditions in form of excel formula.
and Central variable is created using sum function and dataset2
01-04-2012 10:20 AM
You will need to provide more words to descibe what you want to happen.
It looks from a quick inspection that you want to use PROC FREQ or some other summary method to generate the counts in your "output" sheet.
How do the two other sheets interact? From quick inspection it looks like the first are the events to count and the second is perhaps the denominator counts by region? If you need to link them how are the linked? The first sheet seems to have region name and the second has what looks like a region id number.