Мне нужен отчет с настраиваемой сводкой, в следующем отчете показаны поля в наборе тестовых данных, а итоговые результаты представляют собой сумму каждой переменной. Я хочу, чтобы общее значение было суммой переменной num, деленной на сумму переменной tot. т.е. 68/194 = 35,05%, а не сумма процентов в переменной ставки.
data test;
input rank num tot rate;
datalines;
1 20 50 0.4
2 15 30 0.5
3 28 52 0.538461538461538
4 5 62 0.0806451612903226
;
run;
proc report data = _last_ box spacing = 1 split = "/"
style(header) = [font_face = "courier new"] style(column) = [font_face =
"courier new"]
style(lines) = [font_face = "courier new"] style(report) = [font_face =
"courier new"]
style(summary) = [font_face = "courier new" font_style = roman];
column(rank num tot rate);
define rank / " Rank " center width = 6 format = 5. order
order = data;
define num / " N " center width = 6 format = 5.;
define tot / " Total " center width = 6 format = 5.;
define rate / " Rate " center width = 6 format =
percent9.2 ;
rbreak after / summarize style = [font_weight = bold];
run;