> Hi:
> You could try:
> re]
> COLUMN year, product, scripts;
>
> COLUMN scripts, year, product;
> pre]
>
> AND, in the DEFINE statements, both YEAR and PRODUCT
> would be ACROSS variables and SCRIPTS would be a SUM
> variable.
>
> ynthia
Hi Cyhthia I tried this:
Physician product year scripts
Mark Novo 2007 3000
Mark Novo 2007 2000
Mark Feib 2007 2500
Mark Novo 2008 2500
Twain Novo 2007 2000
Twain Novo 2008 3000
Twain Novo 2008 4000
PROC REPORT DATA = novo_fieba NOWINDOWS HEADLINE;
COLUMN physician,year, product, scripts;
define physician/display;
DEFINE year / across;
DEFINE product/ across;
define scripts/sum;
run;
The idea is to display physician's name and in each year how much scripts for each product:
2007 2008
Physician Novo Feib Novo Feib
Mark 3000 2500 2500 -
Twain 2000 - 7000 -