Cynthia,
That is a really nice solution. The fake dataset you created is very similar to my dataset. I am not very familiar with COMPUTE and BREAK AFTER statement in PROC REPORT. I need to create different reports by different regions. So I use BY statement in PROC REPORT to produce different region report in different EXCEL worksheet. Then I try to twist your BREAK AFTER and COMPUTE AFTER statement. But it does give me the result I am looking for. Do you have any idea?
Thanks again.
Hi:
As an alternative to BY group processing, you could remove the BY statement and use PAGE processing (which is unique to PROC REPORT and somewhat similar to the PAGE dimension in TABULATE). You would need to modify the BREAK statement:
break after region / summarize page;
(and, be sure to get rid of the BY statement, too)
ODS TAGSETS.EXCELXP (which is the destination that creates multiple worksheets automatically), will respect the PAGE that's created for every REGION and will then make a new worksheet for every region. You might also discover that Excel uses a default width for the SHOWDATE column and you might also need to modify or change the cellwidth in the DEFINE statement for SHOWDATE:
define showdate / computed 'Date'
style(column)={just=r cellwidth=1.5in};
But I think a combination of the above techniques (using TAGSETS.EXCELXP, using the PAGE option on the BREAK statement and possibly altering the DEFINE statement for SHOWDATE) should work to make 2 sheets (using my data) -- one for EAST and another for WEST.
cynthia
Maybe you need to process your dataset firstly.
datasales;
infile datalines dlm = ',' dsd;
input region $ date : ddmmyy10.sales cost;
month = month(date);
format date ddmmyy10.;
datalines;
"East","06/01/2011",142.53,114.89
"East","06/01/2011",349.52,317.33
"East","06/02/2011",353.39,123.69
"East","06/02/2011",399.33,139.76
"East","06/02/2011",411.45,144.01
"East","06/03/2011",211.94,174.18
"East","06/03/2011",246.76,186.37
"East","06/04/2011",236.43,182.75
"East","06/04/2011",267.17,193.51
"West","06/01/2011",142.53,114.89
"West","06/01/2011",349.52,317.33
"West","06/02/2011",353.39,123.69
"West","06/02/2011",399.33,139.76
"West","06/02/2011",411.45,144.01
"West","06/03/2011",211.94,174.18
"West","06/03/2011",246.76,186.37
"West","06/04/2011",236.43,182.75
"West","06/04/2011",267.17,193.51
;
run;
proc means data=sales nway noprint;
class region month;
var sales cost;
output out=want(drop=_:) sum=/autoname;
run;
datawant;
set want;
lag_sales_sum=lag(sales_sum);
lag_cost_sum=lag(cost_sum);
if month eq 1 then call missing(lag_sales_sum ,lag_cost_sum);
run;
datasales;
merge sales want;
by region month;
run;
ods html file='c:\temp\xx.html' style=sasweb;
proc report data=sales nowd out=test;
by region;
column month date sales cost sales_sumcost_sum lag_sales_sum lag_cost_sum;
define month/order noprint;
define date/display;
define sales_sum/display noprint;
define cost_sum/display noprint;
define lag_sales_sum/display noprint;
define lag_cost_sum/display noprint;
compute lag_cost_sum;
if missing(_break_) then do;
_sales_sum=sales_sum;_cost_sum=cost_sum;
_lag_sales_sum=lag_sales_sum; _lag_cost_sum=lag_cost_sum;
end;
endcomp;
compute after month;
line 'M-t-d' @10 _sales_sum best8. @20 _cost_sum best8.;
line 'Pri-m-t' @10 _lag_sales_sum best8. @20 _lag_cost_sum best8.;
endcomp;
run;
ods html close;
Ksharp
Hi:
While a DATA step pre-processing approach is one possible approach, I don't believe it is necessary. With just 2 changes to my previously posted code, I was able to generate a worksheet for each region using TAGSETS.EXCELXP. The other bump in your approach (to write the extra summary lines with LINE statements) is that there is a high chance that LINE statement output will not appear correctly because the @10 and @20 really only appear as you intend in the LISTING destination (output window). The ODS HTML approach will result in both regions appearing on one sheet when the file is opened in Excel. Also, you would have to use either ODS HTML3 or ODS MSOFFICE2K in order to have the STYLE=SASWEB respected, since Excel isn't really happy about using the style with ODS HTML 4.0 created HTML tags.
cynthia
Hi. Cynthia.
I know it is not necessary to process data firstly. But For op's purpose , Using only one proc report is more difficult than data step.So I prefer to pre-process data for some situation proc report faced difficultly. For @10
it is depend with different destination.Since op did not mention what his destination,and he or she want to use by statement in proc report, so i just want to achieve it by op's purpose.
Ksharp
Hi,
As I said, pre-processing is a viable alternative.
However, the PAGE approach works just as well as BY group processing -- for the purpose of creating multiple sheets. And, since the OP said the main interest was in multi-sheet workbooks in Excel -- this, to me, pointed to TAGSETS.EXCELXP as the destination -- one of the destinations where the LINE statement with @column positioning would not be respected.
cynthia
Thanks Cynthia.
I use SHEET_INTERVAL='bygroup' options in EXCELXP TAGSET to populate the tables name by region. If I use your solution, it seems that I cannot do it anymore. Do you have other alternative way?
Hi:
The default behavior of ODS TAGSETS.EXCELXP is for sheet_interval to be set to 'TABLE' -- when PROC REPORT makes a new table for every page, this default sheet_interval value will make a new sheet for every region's "page" -- without needing to reset the option. So, essentially, you do not need to use sheet_interval='bygroup' -- especially if you take OUT the BY statement, there would be no BY group for sheet_interval='bygroup' to interface with.
The code at the bottom of the post is what I used (only the TAGSETS.EXCELXP section is shown)...the rest of the processing and data is the same as previously posted.
cynthia
ods listing close;
ods tagsets.excelxp file='c:\temp\use_break_page5.xls' style=sasweb;
proc report data=newdata nowd;
title '5) Use Merged Data Values for _RBREAK_ Line';
column region xtra date showdate priorsales priorcost sales cost;
define region / group 'Region';
define xtra / group noprint;
define date / group noprint;
define showdate / computed 'Date'
style(column)={just=r cellwidth=1.5in} ;
define priorsales /sum f=comma10.2 'Prior Sales' /* noprint */;
define priorcost / sum f=comma10.2 'Prior Cost' /* noprint */;
define sales /sum f=comma10.2 'Sales';
define cost / sum f=comma10.2 'Cost';
break after xtra / summarize;
break after region/ summarize page;
compute showdate / character length=30;
showdate = put(date,mmddyy10.);
if upcase(_break_) = 'XTRA' then
showdate = 'M-T-D Totals';
else if upcase(_break_) = 'REGION' then
showdate = 'Prior Month Totals';
endcomp;
compute after region;
** use vars from pastmonths data to populate the summary line;
sales.sum = priorsales.sum;
cost.sum = priorcost.sum;
line ' ';
endcomp;
run;
ods _all_ close;
title; footnote;
There are one more way to use line statement.
As I said, you need to adjust it with the different destionation.
data sales; infile datalines dlm = ',' dsd; input region $ date : ddmmyy10. sales cost; month = month(date); format date ddmmyy10.; datalines; "East","06/01/2011",142.53,114.89 "East","06/01/2011",349.52,317.33 "East","06/02/2011",353.39,123.69 "East","06/02/2011",399.33,139.76 "East","06/02/2011",411.45,144.01 "East","06/03/2011",211.94,174.18 "East","06/03/2011",246.76,186.37 "East","06/04/2011",236.43,182.75 "East","06/04/2011",267.17,193.51 "West","06/01/2011",142.53,114.89 "West","06/01/2011",349.52,317.33 "West","06/02/2011",353.39,123.69 "West","06/02/2011",399.33,139.76 "West","06/02/2011",411.45,144.01 "West","06/03/2011",211.94,174.18 "West","06/03/2011",246.76,186.37 "West","06/04/2011",236.43,182.75 "West","06/04/2011",267.17,193.51 ; run; proc means data=sales nway noprint; class region month; var sales cost; output out=want(drop=_:) sum=/autoname; run; data want; set want; lag_sales_sum=lag(sales_sum); lag_cost_sum=lag(cost_sum); if month eq 1 then call missing(lag_sales_sum ,lag_cost_sum); run; data sales; merge sales want; by region month; run; ods tagsets.excelxp file='c:\temp\use_break_page5.xls' options(SHEET_INTERVAL='bygroup') style=sasweb; proc report data=sales nowd; by region; column month date sales cost sales_sum cost_sum lag_sales_sum lag_cost_sum; define month/order noprint; define date/display; define sales_sum/display noprint; define cost_sum/display noprint; define lag_sales_sum/display noprint; define lag_cost_sum/display noprint; compute lag_cost_sum; if missing(_break_) then do; _sales_sum=sales_sum;_cost_sum=cost_sum; _lag_sales_sum=lag_sales_sum; _lag_cost_sum=lag_cost_sum; end; endcomp; compute after month; str_sum=' '||_sales_sum||' '||_cost_sum; str_lag_sum=' '||_lag_sales_sum||' '||_lag_cost_sum; line @1 'M-t-d:' str_sum $50.; line @1 'Pri-m-t:' str_lag_sum $50.; line ' '; line ' '; endcomp; run; ods tagsets.excelxp close;
OK. I understand what your mean. Maybe your method is a better choice.
Ksharp
Thank you so much. I will try both solution.
Ok, my manager want to change the report template AGAIN. He want to have prior month totle across different region and all region report should be in different worksheet BUT one workbook.
Here is my source data:
proc_mm | country | process_dt | a1 | a2 | a7 | a9 | a11 | a_total | b1 | b2 | b7 | b9 | b11 | b_total | ab_total | realcoamt |
1/1/2012 | 1.NA | 1/1/2012 | 100 | 200 | 300 | 400 | 1000 | 100 | 100 | 1100 | 1000 | |||||
1/1/2012 | 1.NA | 1/2/2012 | 100 | 200 | 300 | 400 | 1000 | 101 | 101 | 1101 | 1000 | |||||
1/1/2012 | 1.NA | 1/3/2012 | 100 | 200 | 300 | 400 | 1000 | 102 | 102 | 1102 | 1000 | |||||
1/1/2012 | 1.NA | 1/4/2012 | 100 | 200 | 300 | 400 | 1000 | 103 | 103 | 1103 | 1000 | |||||
1/1/2012 | 1.NA | 1/5/2012 | 100 | 200 | 300 | 400 | 1000 | 104 | 104 | 1104 | 1000 | |||||
1/1/2012 | 1.NA | 1/6/2012 | 100 | 200 | 300 | 400 | 1000 | 105 | 105 | 1105 | 1000 | |||||
1/1/2012 | 1.NA | 1/7/2012 | 100 | 200 | 300 | 400 | 1000 | 106 | 106 | 1106 | 1000 | |||||
1/1/2012 | 1.NA | 1/8/2012 | 100 | 200 | 300 | 400 | 1000 | 107 | 107 | 1107 | 1000 | |||||
1/1/2012 | 1.NA | 1/9/2012 | 100 | 200 | 300 | 400 | 1000 | 108 | 108 | 1108 | 1000 | |||||
1/1/2012 | 1.NA | 1/10/2012 | 100 | 200 | 300 | 400 | 1000 | 109 | 109 | 1109 | 1000 | |||||
1/1/2012 | 1.NA | 1/11/2012 | 100 | 200 | 300 | 400 | 1000 | 110 | 110 | 1110 | 1000 | |||||
1/1/2012 | 1.NA | 1/12/2012 | 100 | 200 | 300 | 400 | 1000 | 111 | 111 | 1111 | 1000 | |||||
1/1/2012 | 1.NA | 1/13/2012 | 100 | 200 | 300 | 400 | 1000 | 112 | 112 | 1112 | 1000 | |||||
1/1/2012 | 1.NA | 1/14/2012 | 100 | 200 | 300 | 400 | 1000 | 113 | 113 | 1113 | 1000 | |||||
1/1/2012 | 1.NA | 1/15/2012 | 100 | 200 | 300 | 400 | 1000 | 114 | 114 | 1114 | 1000 | |||||
1/1/2012 | 1.NA | 1/16/2012 | 100 | 200 | 300 | 400 | 1000 | 115 | 115 | 1115 | 1000 | |||||
1/1/2012 | 1.NA | 1/17/2012 | 100 | 200 | 300 | 400 | 1000 | 116 | 116 | 1116 | 1000 | |||||
1/1/2012 | 1.NA | 1/18/2012 | 100 | 200 | 300 | 400 | 1000 | 117 | 117 | 1117 | 1000 | |||||
1/1/2012 | 1.NA | 1/19/2012 | 100 | 200 | 300 | 400 | 1000 | 118 | 118 | 1118 | 1000 | |||||
1/1/2012 | 1.NA | 1/20/2012 | 100 | 200 | 300 | 400 | 1000 | 119 | 119 | 1119 | 1000 | |||||
1/1/2012 | 1.NA | 1/21/2012 | 100 | 200 | 300 | 400 | 1000 | 120 | 120 | 1120 | 1000 | |||||
1/1/2012 | 1.NA | 1/22/2012 | 100 | 200 | 300 | 400 | 1000 | 121 | 121 | 1121 | 1000 | |||||
1/1/2012 | 1.NA | 1/23/2012 | 100 | 200 | 300 | 400 | 1000 | 122 | 122 | 1122 | 1000 | |||||
1/1/2012 | 1.NA | 1/24/2012 | 100 | 200 | 300 | 400 | 1000 | 123 | 123 | 1123 | 1000 | |||||
1/1/2012 | 1.NA | 1/25/2012 | 100 | 200 | 300 | 400 | 1000 | 124 | 124 | 1124 | 1000 | |||||
1/1/2012 | 1.NA | 1/26/2012 | 100 | 200 | 300 | 400 | 1000 | 125 | 125 | 1125 | 1000 | |||||
1/1/2012 | 1.NA | 1/27/2012 | 100 | 200 | 300 | 400 | 1000 | 126 | 126 | 1126 | 1000 | |||||
1/1/2012 | 1.NA | 1/28/2012 | 100 | 200 | 300 | 400 | 1000 | 127 | 127 | 1127 | 1000 | |||||
1/1/2012 | 1.NA | 1/29/2012 | 100 | 200 | 300 | 400 | 1000 | 128 | 128 | 1128 | 1000 | |||||
1/1/2012 | 1.NA | 1/30/2012 | 100 | 200 | 300 | 400 | 1000 | 129 | 129 | 1129 | 1000 | |||||
1/1/2012 | 1.NA | 1/31/2012 | 100 | 200 | 300 | 400 | 1000 | 130 | 130 | 1130 | 1000 | |||||
1/1/2012 | 2.UK | 1/1/2012 | 100 | 200 | 300 | 400 | 1000 | 131 | 131 | 1131 | 1000 | |||||
1/1/2012 | 2.UK | 1/2/2012 | 100 | 200 | 300 | 400 | 1000 | 132 | 132 | 1132 | 1000 | |||||
1/1/2012 | 2.UK | 1/3/2012 | 100 | 200 | 300 | 400 | 1000 | 133 | 133 | 1133 | 1000 | |||||
1/1/2012 | 2.UK | 1/4/2012 | 100 | 200 | 300 | 400 | 1000 | 134 | 134 | 1134 | 1000 | |||||
1/1/2012 | 2.UK | 1/5/2012 | 100 | 200 | 300 | 400 | 1000 | 135 | 135 | 1135 | 1000 | |||||
1/1/2012 | 2.UK | 1/6/2012 | 100 | 200 | 300 | 400 | 1000 | 136 | 136 | 1136 | 1000 | |||||
1/1/2012 | 2.UK | 1/7/2012 | 100 | 200 | 300 | 400 | 1000 | 137 | 137 | 1137 | 1000 | |||||
1/1/2012 | 2.UK | 1/8/2012 | 100 | 200 | 300 | 400 | 1000 | 138 | 138 | 1138 | 1000 | |||||
1/1/2012 | 2.UK | 1/9/2012 | 100 | 200 | 300 | 400 | 1000 | 139 | 139 | 1139 | 1000 | |||||
1/1/2012 | 2.UK | 1/10/2012 | 100 | 200 | 300 | 400 | 1000 | 140 | 140 | 1140 | 1000 | |||||
1/1/2012 | 2.UK | 1/11/2012 | 100 | 200 | 300 | 400 | 1000 | 141 | 141 | 1141 | 1000 | |||||
1/1/2012 | 2.UK | 1/12/2012 | 100 | 200 | 300 | 400 | 1000 | 142 | 142 | 1142 | 1000 | |||||
1/1/2012 | 2.UK | 1/13/2012 | 100 | 200 | 300 | 400 | 1000 | 143 | 143 | 1143 | 1000 | |||||
1/1/2012 | 2.UK | 1/14/2012 | 100 | 200 | 300 | 400 | 1000 | 144 | 144 | 1144 | 1000 | |||||
1/1/2012 | 2.UK | 1/15/2012 | 100 | 200 | 300 | 400 | 1000 | 145 | 145 | 1145 | 1000 | |||||
1/1/2012 | 2.UK | 1/16/2012 | 100 | 200 | 300 | 400 | 1000 | 146 | 146 | 1146 | 1000 | |||||
1/1/2012 | 2.UK | 1/17/2012 | 100 | 200 | 300 | 400 | 1000 | 147 | 147 | 1147 | 1000 | |||||
1/1/2012 | 2.UK | 1/18/2012 | 100 | 200 | 300 | 400 | 1000 | 148 | 148 | 1148 | 1000 | |||||
1/1/2012 | 2.UK | 1/19/2012 | 100 | 200 | 300 | 400 | 1000 | 149 | 149 | 1149 | 1000 | |||||
1/1/2012 | 2.UK | 1/20/2012 | 100 | 200 | 300 | 400 | 1000 | 150 | 150 | 1150 | 1000 | |||||
1/1/2012 | 2.UK | 1/21/2012 | 100 | 200 | 300 | 400 | 1000 | 151 | 151 | 1151 | 1000 | |||||
1/1/2012 | 2.UK | 1/22/2012 | 100 | 200 | 300 | 400 | 1000 | 152 | 152 | 1152 | 1000 | |||||
1/1/2012 | 2.UK | 1/23/2012 | 100 | 200 | 300 | 400 | 1000 | 153 | 153 | 1153 | 1000 | |||||
1/1/2012 | 2.UK | 1/24/2012 | 100 | 200 | 300 | 400 | 1000 | 154 | 154 | 1154 | 1000 | |||||
1/1/2012 | 2.UK | 1/25/2012 | 100 | 200 | 300 | 400 | 1000 | 155 | 155 | 1155 | 1000 | |||||
1/1/2012 | 2.UK | 1/26/2012 | 100 | 200 | 300 | 400 | 1000 | 156 | 156 | 1156 | 1000 | |||||
1/1/2012 | 2.UK | 1/27/2012 | 100 | 200 | 300 | 400 | 1000 | 157 | 157 | 1157 | 1000 | |||||
1/1/2012 | 2.UK | 1/28/2012 | 100 | 200 | 300 | 400 | 1000 | 158 | 158 | 1158 | 1000 | |||||
1/1/2012 | 2.UK | 1/29/2012 | 100 | 200 | 300 | 400 | 1000 | 159 | 159 | 1159 | 1000 | |||||
1/1/2012 | 2.UK | 1/30/2012 | 100 | 200 | 300 | 400 | 1000 | 160 | 160 | 1160 | 1000 | |||||
1/1/2012 | 2.UK | 1/31/2012 | 100 | 200 | 300 | 400 | 1000 | 161 | 161 | 1161 | 1000 | |||||
1/1/2012 | 3.DE | 1/1/2012 | 100 | 200 | 300 | 400 | 1000 | 162 | 162 | 1162 | 1000 | |||||
1/1/2012 | 3.DE | 1/2/2012 | 100 | 200 | 300 | 400 | 1000 | 163 | 163 | 1163 | 1000 | |||||
1/1/2012 | 3.DE | 1/3/2012 | 100 | 200 | 300 | 400 | 1000 | 164 | 164 | 1164 | 1000 | |||||
1/1/2012 | 3.DE | 1/4/2012 | 100 | 200 | 300 | 400 | 1000 | 165 | 165 | 1165 | 1000 | |||||
1/1/2012 | 3.DE | 1/5/2012 | 100 | 200 | 300 | 400 | 1000 | 166 | 166 | 1166 | 1000 | |||||
1/1/2012 | 3.DE | 1/6/2012 | 100 | 200 | 300 | 400 | 1000 | 167 | 167 | 1167 | 1000 | |||||
1/1/2012 | 3.DE | 1/7/2012 | 100 | 200 | 300 | 400 | 1000 | 168 | 168 | 1168 | 1000 | |||||
1/1/2012 | 3.DE | 1/8/2012 | 100 | 200 | 300 | 400 | 1000 | 169 | 169 | 1169 | 1000 | |||||
1/1/2012 | 3.DE | 1/9/2012 | 100 | 200 | 300 | 400 | 1000 | 170 | 170 | 1170 | 1000 | |||||
1/1/2012 | 3.DE | 1/10/2012 | 100 | 200 | 300 | 400 | 1000 | 171 | 171 | 1171 | 1000 | |||||
1/1/2012 | 3.DE | 1/11/2012 | 100 | 200 | 300 | 400 | 1000 | 172 | 172 | 1172 | 1000 | |||||
1/1/2012 | 3.DE | 1/12/2012 | 100 | 200 | 300 | 400 | 1000 | 173 | 173 | 1173 | 1000 | |||||
1/1/2012 | 3.DE | 1/13/2012 | 100 | 200 | 300 | 400 | 1000 | 174 | 174 | 1174 | 1000 | |||||
1/1/2012 | 3.DE | 1/14/2012 | 100 | 200 | 300 | 400 | 1000 | 175 | 175 | 1175 | 1000 | |||||
1/1/2012 | 3.DE | 1/15/2012 | 100 | 200 | 300 | 400 | 1000 | 176 | 176 | 1176 | 1000 | |||||
1/1/2012 | 3.DE | 1/16/2012 | 100 | 200 | 300 | 400 | 1000 | 177 | 177 | 1177 | 1000 | |||||
1/1/2012 | 3.DE | 1/17/2012 | 100 | 200 | 300 | 400 | 1000 | 178 | 178 | 1178 | 1000 | |||||
1/1/2012 | 3.DE | 1/18/2012 | 100 | 200 | 300 | 400 | 1000 | 179 | 179 | 1179 | 1000 | |||||
1/1/2012 | 3.DE | 1/19/2012 | 100 | 200 | 300 | 400 | 1000 | 180 | 180 | 1180 | 1000 | |||||
1/1/2012 | 3.DE | 1/20/2012 | 100 | 200 | 300 | 400 | 1000 | 181 | 181 | 1181 | 1000 | |||||
1/1/2012 | 3.DE | 1/21/2012 | 100 | 200 | 300 | 400 | 1000 | 182 | 182 | 1182 | 1000 | |||||
1/1/2012 | 3.DE | 1/22/2012 | 100 | 200 | 300 | 400 | 1000 | 183 | 183 | 1183 | 1000 | |||||
1/1/2012 | 3.DE | 1/23/2012 | 100 | 200 | 300 | 400 | 1000 | 184 | 184 | 1184 | 1000 | |||||
1/1/2012 | 3.DE | 1/24/2012 | 100 | 200 | 300 | 400 | 1000 | 185 | 185 | 1185 | 1000 | |||||
1/1/2012 | 3.DE | 1/25/2012 | 100 | 200 | 300 | 400 | 1000 | 186 | 186 | 1186 | 1000 | |||||
1/1/2012 | 3.DE | 1/26/2012 | 100 | 200 | 300 | 400 | 1000 | 187 | 187 | 1187 | 1000 | |||||
1/1/2012 | 3.DE | 1/27/2012 | 100 | 200 | 300 | 400 | 1000 | 188 | 188 | 1188 | 1000 | |||||
1/1/2012 | 3.DE | 1/28/2012 | 100 | 200 | 300 | 400 | 1000 | 189 | 189 | 1189 | 1000 | |||||
1/1/2012 | 3.DE | 1/29/2012 | 100 | 200 | 300 | 400 | 1000 | 190 | 190 | 1190 | 1000 | |||||
1/1/2012 | 3.DE | 1/30/2012 | 100 | 200 | 300 | 400 | 1000 | 191 | 191 | 1191 | 1000 | |||||
1/1/2012 | 3.DE | 1/31/2012 | 100 | 200 | 300 | 400 | 1000 | 192 | 192 | 1192 | 1000 | |||||
1/1/2012 | 8.Global Total | 1/1/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 394 | 0 | 0 | 394 | 3394 | 1000 |
1/1/2012 | 8.Global Total | 1/2/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 397 | 0 | 0 | 397 | 3397 | 1000 |
1/1/2012 | 8.Global Total | 1/3/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 400 | 0 | 0 | 400 | 3400 | 1000 |
1/1/2012 | 8.Global Total | 1/4/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 403 | 0 | 0 | 403 | 3403 | 1000 |
1/1/2012 | 8.Global Total | 1/5/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 406 | 0 | 0 | 406 | 3406 | 1000 |
1/1/2012 | 8.Global Total | 1/6/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 409 | 0 | 0 | 409 | 3409 | 1000 |
1/1/2012 | 8.Global Total | 1/7/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 412 | 0 | 0 | 412 | 3412 | 1000 |
1/1/2012 | 8.Global Total | 1/8/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 415 | 0 | 0 | 415 | 3415 | 1000 |
1/1/2012 | 8.Global Total | 1/9/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 418 | 0 | 0 | 418 | 3418 | 1000 |
1/1/2012 | 8.Global Total | 1/10/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 421 | 0 | 0 | 421 | 3421 | 1000 |
1/1/2012 | 8.Global Total | 1/11/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 424 | 0 | 0 | 424 | 3424 | 1000 |
1/1/2012 | 8.Global Total | 1/12/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 427 | 0 | 0 | 427 | 3427 | 1000 |
1/1/2012 | 8.Global Total | 1/13/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 430 | 0 | 0 | 430 | 3430 | 1000 |
1/1/2012 | 8.Global Total | 1/14/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 433 | 0 | 0 | 433 | 3433 | 1000 |
1/1/2012 | 8.Global Total | 1/15/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 436 | 0 | 0 | 436 | 3436 | 1000 |
1/1/2012 | 8.Global Total | 1/16/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 439 | 0 | 0 | 439 | 3439 | 1000 |
1/1/2012 | 8.Global Total | 1/17/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 442 | 0 | 0 | 442 | 3442 | 1000 |
1/1/2012 | 8.Global Total | 1/18/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 445 | 0 | 0 | 445 | 3445 | 1000 |
1/1/2012 | 8.Global Total | 1/19/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 448 | 0 | 0 | 448 | 3448 | 1000 |
1/1/2012 | 8.Global Total | 1/20/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 451 | 0 | 0 | 451 | 3451 | 1000 |
1/1/2012 | 8.Global Total | 1/21/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 454 | 0 | 0 | 454 | 3454 | 1000 |
1/1/2012 | 8.Global Total | 1/22/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 457 | 0 | 0 | 457 | 3457 | 1000 |
1/1/2012 | 8.Global Total | 1/23/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 460 | 0 | 0 | 460 | 3460 | 1000 |
1/1/2012 | 8.Global Total | 1/24/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 463 | 0 | 0 | 463 | 3463 | 1000 |
1/1/2012 | 8.Global Total | 1/25/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 466 | 0 | 0 | 466 | 3466 | 1000 |
1/1/2012 | 8.Global Total | 1/26/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 469 | 0 | 0 | 469 | 3469 | 1000 |
1/1/2012 | 8.Global Total | 1/27/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 472 | 0 | 0 | 472 | 3472 | 1000 |
1/1/2012 | 8.Global Total | 1/28/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 475 | 0 | 0 | 475 | 3475 | 1000 |
1/1/2012 | 8.Global Total | 1/29/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 478 | 0 | 0 | 478 | 3478 | 1000 |
1/1/2012 | 8.Global Total | 1/30/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 481 | 0 | 0 | 481 | 3481 | 1000 |
1/1/2012 | 8.Global Total | 1/31/2012 | 300 | 600 | 900 | 0 | 1200 | 3000 | 0 | 0 | 484 | 0 | 0 | 484 | 3484 | 1000 |
2/1/2012 | 1.NA | 2/1/2012 | 100 | 200 | 300 | 400 | 1000 | 224 | 224 | 1224 | 1000 | |||||
2/1/2012 | 1.NA | 2/2/2012 | 100 | 200 | 300 | 400 | 1000 | 225 | 225 | 1225 | 1000 | |||||
2/1/2012 | 1.NA | 2/3/2012 | 100 | 200 | 300 | 400 | 1000 | 226 | 226 | 1226 | 1000 | |||||
2/1/2012 | 1.NA | 2/4/2012 | 100 | 200 | 300 | 400 | 1000 | 227 | 227 | 1227 | 1000 | |||||
2/1/2012 | 1.NA | 2/5/2012 | 100 | 200 | 300 | 400 | 1000 | 228 | 228 | 1228 | 1000 | |||||
2/1/2012 | 1.NA | 2/6/2012 | 100 | 200 | 300 | 400 | 1000 | 229 | 229 | 1229 | 1000 | |||||
2/1/2012 | 1.NA | 2/7/2012 | 100 | 200 | 300 | 400 | 1000 | 230 | 230 | 1230 | 1000 | |||||
2/1/2012 | 2.UK | 2/1/2012 | 100 | 200 | 300 | 400 | 1000 | 231 | 231 | 1231 | 1000 | |||||
2/1/2012 | 2.UK | 2/2/2012 | 100 | 200 | 300 | 400 | 1000 | 232 | 232 | 1232 | 1000 | |||||
2/1/2012 | 2.UK | 2/3/2012 | 100 | 200 | 300 | 400 | 1000 | 233 | 233 | 1233 | 1000 | |||||
2/1/2012 | 2.UK | 2/4/2012 | 100 | 200 | 300 | 400 | 1000 | 234 | 234 | 1234 | 1000 | |||||
2/1/2012 | 2.UK | 2/5/2012 | 100 | 200 | 300 | 400 | 1000 | 235 | 235 | 1235 | 1000 | |||||
2/1/2012 | 2.UK | 2/6/2012 | 100 | 200 | 300 | 400 | 1000 | 236 | 236 | 1236 | 1000 | |||||
2/1/2012 | 2.UK | 2/7/2012 | 100 | 200 | 300 | 400 | 1000 | 237 | 237 | 1237 | 1000 | |||||
2/1/2012 | 3.DE | 2/1/2012 | 100 | 200 | 300 | 400 | 1000 | 238 | 238 | 1238 | 1000 | |||||
2/1/2012 | 3.DE | 2/2/2012 | 100 | 200 | 300 | 400 | 1000 | 239 | 239 | 1239 | 1000 | |||||
2/1/2012 | 3.DE | 2/3/2012 | 100 | 200 | 300 | 400 | 1000 | 240 | 240 | 1240 | 1000 | |||||
2/1/2012 | 3.DE | 2/4/2012 | 100 | 200 | 300 | 400 | 1000 | 241 | 241 | 1241 | 1000 | |||||
2/1/2012 | 3.DE | 2/5/2012 | 100 | 200 | 300 | 400 | 1000 | 242 | 242 | 1242 | 1000 | |||||
2/1/2012 | 3.DE | 2/6/2012 | 100 | 200 | 300 | 400 | 1000 | 243 | 243 | 1243 | 1000 | |||||
2/1/2012 | 3.DE | 2/7/2012 | 100 | 200 | 300 | 400 | 1000 | 244 | 244 | 1244 | 1000 | |||||
2/1/2012 | 8.Global Total | 2/1/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 693 | 0 | 0 | 693 | 3693 | 3000 |
2/1/2012 | 8.Global Total | 2/2/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 696 | 0 | 0 | 696 | 3696 | 3000 |
2/1/2012 | 8.Global Total | 2/3/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 699 | 0 | 0 | 699 | 3699 | 3000 |
2/1/2012 | 8.Global Total | 2/4/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 702 | 0 | 0 | 702 | 3702 | 3000 |
2/1/2012 | 8.Global Total | 2/5/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 705 | 0 | 0 | 705 | 3705 | 3000 |
2/1/2012 | 8.Global Total | 2/6/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 708 | 0 | 0 | 708 | 3708 | 3000 |
2/1/2012 | 8.Global Total | 2/7/2012 | 300 | 600 | 900 | 0 | 1800 | 3000 | 0 | 0 | 711 | 0 | 0 | 711 | 3711 | 3000 |
The code provided seems not working. Any idea?
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.