DATA Step, Macro, Functions and more

how can i get column sum group by zone in proc report sas

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

how can i get column sum group by zone in proc report sas

ODS PDF FILE="E:\RF_CCDS\overall_Helpdesk_Tickets.pdf" startpage=no;
title "Oveall Pending Summary Report";

title1 "Zone Wise Pending Summary Report";
PROC REPORT DATA=pending_summary_ZoneWise out=summary_table_zonewise LIST
/*style=[cellwidth=.1 in rules=group frame=void] */
style(header)=[background= #BBDEFB foreground=black]
style(summary)=[background=white foreground=black font_weight=bold];


COLUMN Zone Product_ '<=2 days'n '3-5 DAYS'N '6-7 DAYS'N '8-10 DAYS'N '>10 DAYS'N 'Total App'n ;
DEFINE Zone / display ;
DEFINE Product_ / display ;
define '<=2 days'n /display analysis sum style(header)={background=green foreground=black};
define '3-5 DAYS'N /display analysis sum style(header)={background=green foreground=black} ;
define '6-7 DAYS'N /display analysis sum style(header)={background=yellow foreground=black};
define '8-10 DAYS'N /display analysis sum style(header)={background=red foreground=black};
define '>10 DAYS'N /display analysis sum style(header)={background=red foreground=black} ;
define 'Total App'n /display analysis sum style=[font_weight=bold foreground=black ] ;

RUN;

 

ods pdf close;

 


Accepted Solutions
Solution
4 weeks ago
Valued Guide
Posts: 563

Re: how can i get column sum group by zone in proc report sas

Have a look at the documentation of proc report ... you need a break statement ... http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473623.htm

View solution in original post


All Replies
PROC Star
Posts: 260

Re: how can i get column sum group by zone in proc report sas

I think you could change the definition of Zone to ORDER, and then have a line like "Break after zone/summarize"

Occasional Contributor
Posts: 5

Re: how can i get column sum group by zone in proc report sas

@s_lassen thanks for the solution its working i am getting my excepted column sum output for all zone .
and can you help to calculate Zonewise column sum.
Occasional Contributor
Posts: 5

Re: how can i get column sum group by zone in proc report sas

title1 "Zone Wise Pending Summary Report";
PROC REPORT DATA=pending_summary_ZoneWise out=summary_table_zonewise LIST 
/*style=[cellwidth=.1 in rules=group frame=void] */
style(header)=[background= #BBDEFB foreground=black]
style(summary)=[background=white    foreground=black font_weight=bold];


COLUMN Zone Product_ '<=2 days'n '3-5 DAYS'N '6-7 DAYS'N '8-10 DAYS'N '>10 DAYS'N 'Total App'n ;
define Zone /display group ;
  rbreak after / summarize;

DEFINE Product_ / display   ;
 define '<=2 days'n / analysis sum style(header)={background=green foreground=black};
define '3-5 DAYS'N / analysis sum style(header)={background=green foreground=black} ;
 define '6-7 DAYS'N / analysis sum  style(header)={background=yellow foreground=black};
define '8-10 DAYS'N / analysis sum   style(header)={background=red foreground=black};
define  '>10 DAYS'N / analysis sum style(header)={background=red foreground=black} ;
  define 'Total App'n / analysis sum  style=[font_weight=bold foreground=black ] ;

RUN; 


Solution
4 weeks ago
Valued Guide
Posts: 563

Re: how can i get column sum group by zone in proc report sas

Have a look at the documentation of proc report ... you need a break statement ... http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473623.htm

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 110 views
  • 2 likes
  • 3 in conversation