sas not do sum of all obeservation -


i have dataset name censusdata 11346 observation in last observationare blank data.we have find total population variable name t_p.

i using code:

data q1(keep=t_p count); set censusdata; array num(*) t_p; retain count; i=1 dim(num); if t_p = count=t_p; else count+t_p; end; run; 

problem sas find sum of first 3236 observation sum of 3237 4683 observation , on.they cannot sum of observation need.

we need sum of totalpopulation(t_p) & need output dataset this

totalpopulation=number

sum variable in proc sql step:

proc sql;     create table q1 select         sum(t_p) total_pop         censusdata; quit; 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -