BookmarkSubscribeRSS Feed
pihu_11
Calcite | Level 5

Hi All,

I have SAS dataset that I'm converting into a .xml file using proc report n ODS.

There are 7 variables in that dataset and sorted in the order I need.

The group variable is var1 which has different values and each unique value has either 1,2 or more rows with different values of other variables (var5,var6,var7).

var2,3, and 4 will have same values for each group.

Problem: I need to display the variables Var1-4 only once for each group.

var1var2var3var4var5 var6var7
a11ht4444ttgfq1
a11ht4453f3rgew1
a24ht22dfewrta1
a3545cs12ffred1
a3545cs12425fefd1
a3545cs12234f34f1

This is what I require:

var1var2var3var4var5 var6var7
a11ht4444ttgfq1
453f3rgew1
a24ht22dfewrta1
a3545cs12ffred1
425fefd1
234f34f1

Which type of variable should be used in proc report for Var1-4?? Display? group? order?

Thanks

Pihu

1 REPLY 1
SASKiwi
PROC Star

Var1 to Var4 need to be defined as GROUP variables for the behaviour you want.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 617 views
  • 3 likes
  • 2 in conversation