Currently #BYVAL does not work for footnotes in BASE SAS, only titles (as documented). Would be nice for it to work in footnotes. Note the below, the footnotes are incorrect (and report the BY value of the next group):
proc sort data=sashelp.class out=class;
proc report data=class nowd;
title1 "below is print out of: #BYVAL1";
footnote1 "above is print out of: #BYVAL1";;
It seems it does work in SAS/GRAPH and ODS graphics, as long as the footnote as generated as part of the graph (gfootnote).