BookmarkSubscribeRSS Feed
fadt
Calcite | Level 5
Hi everyone, I am trying to create footnote for a webpage that has various years of data and each year will have a different footnote. How can I get this done?
5 REPLIES 5
Ksharp
Super User
[pre]
options nobyline;
data air;
set sashelp.air;
year=year(date);
run;
ods html file='c:\temp\data.html' style=sasweb ;
title;
proc report data=air nowd;
by year;
column date air;
define date/display;
run;
footnote 'year: #byval1';
ods html close;
[/pre]



Ksharp
fadt
Calcite | Level 5
Thanks, Ksharp it worked.
But let me ask this, is it possible to customize the footnote for each year?.
So that there will be different footnote for each of the years.


fadt.
Cynthia_sas
SAS Super FREQ
Hi:
When you use any of the #byval or #byline features, the text is the same and the only piece of the title that changes is the #byval -- in this case only the year changes.

If you create your output with BY groups and save it the output in an ODS DOCUMENT store, you can manipulate the output and/or put a completely different title or footnote for every BY group using PROC DOCUMENT statements.

There is an example of doing something similar on page 21 of this paper:
http://support.sas.com/resources/papers/sgf09/318-2009.pdf

You can see that the OBBNOTE statement set the title for Canada to 'Something' and the title for Germany to 'Something Else'. The OBBNOTE is a "before" note and the OBANOTE statement would be set for an "after" note.

cynthia
fadt
Calcite | Level 5
Thanks for your time.
Ksharp
Super User
[pre]


data air;
set sashelp.air;
year=year(date);
run;
ods html file='c:\temp\data.html' style=sasweb ;
ods escapechar='~';
title;
proc report data=air nowd;
where year eq 1950;
column date air;
define date/display;
run;
ods text="~S={asis=on fontsize=20px } Footnote A";
ods text=' ';

proc report data=air nowd;
where year eq 1951;
column date air;
define date/display;
run;
ods text='Footnote B';


proc report data=air nowd;
where year eq 1952;
column date air;
define date/display;
run;
ods text='Footnote C';






ods html close;
[/pre]



Ksharp

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 820 views
  • 0 likes
  • 3 in conversation