BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Gil_
Quartz | Level 8
The data needs to look like this output
Dos._____ total._Mon__Tue__ Wed__ thur.__Fri__ Sat
Tue. Fri.___125.________125.______________125_____

WED_______ 25________________25________________
Patrick
Opal | Level 21

@Gil_

Please provide fully working SAS data steps creating sample data!

Post your desired result using insert codeCapture.JPG so the layout doesn't get messed up.

 

Gil_
Quartz | Level 8
Here is the table
Proc sql;
Create table want as
(Select
A.id,
A.dos,
A.total,
A2.date1,
A2.date2,
A2.date3,
A2.date4,
A2.date5
From table a, tablea2
Where a.id =a2.id
);
Run;
Id__dos___total_date1 ___date2_date3_date4_date5

A1__Wed Sat_125._06/26_17_ 06/27/17 _06/28/17
For space I can add 3
What I want is this

A1__Wed Sat_125._06/26_17_ 06/27/17 _125

Dos has the date of week which I need to add the total where we match based on the day
Gil_
Quartz | Level 8
I was able to add the 21 days I just need to Id in the dos col based on date of week

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 18 replies
  • 3893 views
  • 0 likes
  • 6 in conversation