BookmarkSubscribeRSS Feed
BobHope
Quartz | Level 8

Hi,

I am trying to get repeated values to be shown one of my group columns in proc report. I have tried the trick described in the Allison McMahill's article:

COMPUTE week;

IF week NE ' ' then holdw=week;

IF week EQ ' ' then week=holdw;

ENDCOMP;

However this trick does not work when spanrows option is enabled (and I need it to be enabled for the other columns to avoid confusion). Is there a way to get this thing working? Any help is much appreciated.

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  You can't turn SPANROWS on and off for different variables. Once SPANROWS is turned on, it is on for ALL the ORDER or GROUP items you have. Since you didn't post data or your complete code or desired results or name your destination of interest, it's hard to make any other comments.

cynthia

BobHope
Quartz | Level 8

I did not mean to switch the SPANROWS on and off, either completely off or on. However the problem is that the trick I mentioned in the original post does not worki if SPANROWS is on. I have edited my first post and attached a sample data and code for my issue, there I only get the "stairstep" report table no matter what I do. And in fact with the data I generated the spanrows does really odd things and somehow makes some across values disappear. The problem is I can't post the actual data here, and it is really hard to mimic it. But basically with that data I would want to get all the order/group variables to show in every row and then get the table in "normal" form not in this stairstep formation which is really frustrating (somehow with the actual data I have managed to get the table to transpose it naturally, but couldn't get it working with the sample data...)

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2 replies
  • 861 views
  • 0 likes
  • 2 in conversation