Hi,
I need help on adjusting alignment for footnotes. I have got the following codes currently:
TITLE j=left "Jadual B1 : Jumlah penduduk mengikut kumpulan etnik, kawasan pihak berkuasa tempa'tan dan negeri, Malaysia, 2010";
Title2 font=bold italic j=left "Table B1 : Total population by ethnic group, local authority area and state, Malaysia, 2010";
title3 " ";
title4 j=left "Negeri : NEGERI SEMBILAN";
title5 font=bold italic j=left "State";
proc tabulate data=WORK.DOSM order=data;
where not missing(NEW_ETHNICITY);
class DISTRICT NEW_ETHNICITY NEW_CITIZENSHIP /Missing;
classlev NEW_ETHNICITY;
CLASSLEV NEW_citizenship;
classlev district;
var ID;
table ALL DISTRICT=' ', ALL NEW_ETHNICITY='Warganegara Malaysia
Malaysian citizens' ALL
NEW_CITIZENSHIP='Bukan Warganegara Malaysia *Non- Malaysian citizens *'
/Box='Daerah Pentadbiran/Kawasan Pihak Berkuasa Tempatan
Administrative District/Local Authority Area' row=float MISSTEXT='0';
keylabel N=' ';
keylabel all='Jumlah Total';
footnote font=arial bold j=left "Nota" font=arial bold italic "/Note";
footnote2 j=l f='ARIAL amt/bold' "Angka-angka di atas tidak disesuaikan untuk kurang penghitungan.";
run;
And i get the following result:
However, i need the footnote2 first word 'Angka' to start after Note/Nota as per the following example:
Could anyone please help me on this?
Thank you.
ods escapechar='~';
proc tabulate ........
..............
footnote font=arial bold j=left "Nota" font=arial bold italic "/Note";
footnote2 j=l f='~_~_~_~_~_~_~_~_~_ARIAL amt/bold' "Angka-angka di atas tidak disesuaikan untuk kurang penghitungan.";
There is no automatic way of doing this, valid alignements are left, right, and center. The simplest method is to add spaces to increment the footnote out to where you want it. I would also avoid putting footnotes in the proc step, there is no need and it just clutters the proc, and please avoid upper case coding, makes reading the code much harder.
Hi,
Thank for your reply. Can you please explain to me how to add spaces to increment the footnote? I need the table precisely on this format; hence i need the footnote.
Press the spacebar:
footnote font=arial bold j=left "Nota" font=arial bold italic "/Note"; footnote2 j=l f='ARIAL amt/bold' " Angka-angka di atas tidak disesuaikan untuk kurang penghitungan.";
You may have to add or remove a space to get the alignment. If you have to do this a lot, consider aligning the footnotes rather than offsettting them somewhat. Otherwise you may need a cat(repeat(" ",lengthn(previousfootnote)-1),"Your new footnote")
Hi,
I have actually tried adding blank spaces before the first letter. However, this does not work for me :(. Any other suggestion?
Thanks
"However, this does not work for me" - does not tell me anything. What did not work, was it not aligned, did it crash? As I said there is no automatic alignment for what you are asking (as its not a standard alignment), so you need to fix it in yourself somehow.
ods escapechar='~';
proc tabulate ........
..............
footnote font=arial bold j=left "Nota" font=arial bold italic "/Note";
footnote2 j=l f='~_~_~_~_~_~_~_~_~_ARIAL amt/bold' "Angka-angka di atas tidak disesuaikan untuk kurang penghitungan.";
Hi,
It works. Thank you for the help. 🙂
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.