PROC REPORT RBREAK 行可以包含多个级别的分组吗?
我有一些 PROC REPORT
代码,可以生成具有 2 个分组级别的报告,但 RBREAK
始终只是对所有内容进行总结。例如,我得到这样的信息:
Row1: Type A Before 100 200 300 Row2: After 400 500 600 Row3: Type B Before 100 200 300 Row4: After 400 500 600 Row5: Total 700 800 900
有没有办法让 PROC REPORT 完整地总结第二级分组?我有 140,000 多个观察结果,现在我正在复制每个观察结果并将第一级分组变量设置为一个常量值,以获得包含第二级分组的制造总行:
Row1: Type A Before 100 200 300 Row2: After 400 500 600 Row3: Type B Before 100 200 300 Row4: After 400 500 600 Row5: Total Before 700 800 900 Row6: After 701 801 901
或者即使 PROC REPORT
无法自动执行任何操作,是否有更好的方法将总数放在底部?我希望我可以使用多标签格式...但据我所知,它们在 PROC REPORT 中不起作用。
I have some PROC REPORT
code that generates a report with 2 levels of grouping, but the RBREAK
always just summarizes for everything. I get something like this for example:
Row1: Type A Before 100 200 300 Row2: After 400 500 600 Row3: Type B Before 100 200 300 Row4: After 400 500 600 Row5: Total 700 800 900
Is there any way to get PROC REPORT
to summarize with that second level grouping intact? I have 140,000+ observations, and right now I'm duplicating every observation and setting the first level grouping variable to one constant value to get a manufactured total row with the second level grouping included:
Row1: Type A Before 100 200 300 Row2: After 400 500 600 Row3: Type B Before 100 200 300 Row4: After 400 500 600 Row5: Total Before 700 800 900 Row6: After 701 801 901
Or even if PROC REPORT
can't do anything automatically, is there a better way to get the total at the bottom? I wish I could use multi-label formats...but they don't work in PROC REPORT
as far as I know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 proc tabulate 可以很容易地做到这一点:
This is really easy to do with
proc tabulate
: