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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.