Q1. How can we order the population in Ascending order in the following proc report step?
Q2. Why the format option is not working in the following define statement in proc report step?
data one;
input Name $1-19 Capital $21-35 Population Area Continent $57-71 UNDate;
cards;
Afghanistan Kabul 17070323 251825 Asia 1946
Albania Tirane 3407400 11100 Europe 1955
Algeria Algiers 28171132 919595 Africa 1962
Andorra Andorra la Vell 64634 200 Europe 1993
Angola Luanda 9901050 481300 Africa 1976
Antigua and Barbuda St. John’s 65644 171 Central America 1981
Argentina Buenos Aires 34248705 1073518 South America 1945
Armenia Yerevan 3556864 11500 Asia 1992
Australia Canberra 18255944 2966200 Australia 1945
Austria Vienna 8033746 32400 Europe 1955
Azerbaijan Baku 7760064 33400 Asia 1992
Bahamas Nassau 275703 5400 Central America 1973
Bahrain Manama 591800 300 Asia 1971
Bangladesh Dhaka 1.26E+08 57300 Asia 1974
Barbados Bridgetown 258534 200 Central America 1966
proc print;
run;
proc report data=one nowd headline ;
column continent population, sum;
define continent / group;
define population / 'TotPop' format=comma15.;
where Population gt 1000000;
run;
Hi,
Try this..hope it helps..
proc report data=one nowd headline ;
column continent population;
define continent / group;
define population / 'TotPop' order format=comma15.;
where Population gt 1000000;
run;
Thanks,
Shiva
Sorry this is not working and summing of population also not happening
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!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.