My current output using proc report is in below format :
Change Type | Script_Count (%) | Member (%) |
Neutral - No Change | 95.48% | 95.48% |
Positive Change | 2.76% | 2.76% |
Negative Change | 1.76% | 1.76% |
Total Percentage | 100.00% | 100.00% |
But , Client is asking for Member(%) data for only Negative Change : It should look like below
Change Type | Script_Counts (%) | Member (%) |
Neutral - No Change | 95.48% | - |
Positive Change | 2.76% | - |
Negative Change | 1.76% | 1.76% |
Total Percentage | 100.00% | - |
any idea how can i limit the column value only for one row. ?
My Current code and data below.
DATA SET :
SASUSER.chg_pct
Change_Desc | Script_count | mbr_pct |
1 | 95.48% | 95.48% |
2 | 2.76% | 2.76% |
3 | 1.76% | 1.76% |
CODE:
proc format;
value $Change_Sum
'1'='Neutral - No Change'
'2'='Positive Change'
'3'='Negative Change'
'T'='Total Percentage';
run;
proc report data=SASUSER.chg_pct nowd;
column Change_Desc Script_Percent mbr_pct;
TITLE J=L "Summary";
DEFINE Change_Desc / GROUP ' Change Type' FORMAT=$Change_Sum. CENTER width=22 order=INTERNAL MISSING;
define Script_Percent / analysis SUM ' Script_Counts (%)' format=PERCENT8.2 CENTER missing;
define mbr_pct / analysis SUM 'Member (%)' format=PERCENT8.2 CENTER missing ;
RBREAK AFTER / summarize ;
COMPUTE AFTER ;
Change_Desc= 'T';
endcomp;
RUN;
TITLE;
Any help would be highly appreciated.
Thanks,
M
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.