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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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