BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8


I have MEAN values after doing a summary

Category      Mean

A                  3.56

B                  2.59

C                  8.54

If i use these mean values in the proc report with Display option in the define statement instead of Analysis as shown

define mean/display

and do a rbreak after / summarize;

Will I get missing values for Subtotal(break) and Total(rbreak) of MEAN variable????.I dont want to do a analysis because they are already Mean values

For other variables I want to use analaysis though to find the COUNTS etc

Thanks

1 REPLY 1
Cynthia_sas
Diamond | Level 26

Hi, you can always make a test program to figure out the answer to these types of questions. See the example below. Since you referred to both BREAK and RBREAK, I made a few ORDER items so the report could have both a BREAK and RBREAK statement.

If you run the code, you will see that when a numeric report item has a usage of DISPLAY, there is *NOTHING* calculated for the item at any of the break lines. So it is not "missing", there is just an empty cell.

cynthia

data test;

  infile datalines;

  input Othergrp $ Category $ Mean Counts FakeNum;

return;

datalines;

www A                  3.56  100  999

www B                  2.59  150  888

www C                  8.54  125  777

xxx A                  2.56  100  122

xxx B                  1.59  150  233

xxx C                  7.54  125  344

yyy A                  2.56  100  221

yyy B                  2.19  150  332

yyy C                  6.54  125  443

;

run;

ods html file='c:\temp\testreport_usage.html' style=sasweb;

 

proc report data=test nowd;

  column othergrp category mean counts fakenum;

  define othergrp / order;

  define category / order;

  define mean / display;

  define counts / sum f=comma6.;

  define fakenum / sum f=comma6.;

  rbreak after / summarize;

  break after othergrp / summarize;

run;

ods html close;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 999 views
  • 0 likes
  • 2 in conversation