Help using Base SAS procedures

PROC REPORT repeated group var values with spanrow

Reply
Contributor
Posts: 60

PROC REPORT repeated group var values with spanrow

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.

Attachment
SAS Super FREQ
Posts: 8,864

Re: PROC REPORT repeated group var values with spanrow

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

Contributor
Posts: 60

Re: PROC REPORT repeated group var values with spanrow

Posted in reply to Cynthia_sas

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...)

Ask a Question
Discussion stats
  • 2 replies
  • 246 views
  • 0 likes
  • 2 in conversation