BookmarkSubscribeRSS Feed
jibyjacob
Fluorite | Level 6

I have two datasets for Feb and March 2016 with same varaibles. I need to bring in values from four vairables in feb dataset to march. without changing other March data. Can you please help.

 

Can i join the tables?

for example..

 

 

7 REPLIES 7
Reeza
Super User

Please post sample data and expected output. We can make guesses but it's easier if you detail your problem as much as possible. 

jibyjacob
Fluorite | Level 6

Feb data

 

Conditional_Format_BDConditional_Format_EPConditional_Format_CRConditional_Format_IN
0000
0100
0000

 

March data

Conditional_Format_BDConditional_Format_EPConditional_Format_CRConditional_Format_IN
0000 
0000 
0000 

 

These are the values i need to bring in from previous month.. Other values in march should not be changed ( I mean other varaibles which I am not showing here) . I will be creating a macro vaiable for prev and Curr month..

jibyjacob
Fluorite | Level 6
Hi Reeza

Did you get a chance to check? Appreciate your help
Quentin
Super User
What do you mean by "bring in" values. Given the sample data you posted from Feb and March, what is the output dataset you Want? Would it have the same for variables, with 6 records? So do you want to append these files, or do you want something else?
BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
jibyjacob
Fluorite | Level 6

 

dataset looks like this. I need to copy last four varaible values from Feb to March

 

 

Date_ReportDDSSEEXXConditional_Format_BDConditional_Format_EPConditional_Format_CRConditional_Format_IN
29/02/201611383101.1513105123.628318579.662706532.970000
29/02/20161730.81730.8  0000
29/02/20161138687213110942.788322104.772716298.050100
29/02/201611384831.9513110781.228322104.772716298.050100
29/02/20165482757.326377402.862421942.79278172.260000
29/02/2016-3639-3639  0000
29/02/20165479118.326374998.9972421942.79279848.81100
29/02/20165478024.326374996.9282421942.79279848.80100
29/02/20162737152.63667196.942871919.48-789862.870000
29/02/201690.8190.81  0000
29/02/20162737242.2863669005.5142871919.48-789862.871100
29/02/20162737243.413668931.262871919.48-789862.870100
29/02/20161479461.272511383.611250537.37449979.070000
29/02/2016-2289.72-2289.72  0000
29/02/20161477171.612509374.8851250412.37449979.071100
29/02/20161477171.5525093751250412.37449979.070100
29/02/20163490972845497720.69  0000
29/02/20163490973445495069.95  0000
29/02/201673944928251938.9  0000
29/02/201673944198261482.89  0000
29/02/201614925722945.45  0000
29/02/201614925724995.3723  0100
29/02/201662778643677231.33  0000
29/02/201662774893663867.51  0000
29/02/2016494216324496.1  0000
29/02/2016494846324158.48  0000
29/02/20162458323430.48  0000
29/02/20162458323593.27  0100
29/02/2016209964313892.01  0000
29/02/2016209964314443.73  0100
29/02/2016  1736807.67-398776.510000
29/02/2016  1632158.83-426445.220000
31/03/201612882827.2314113074.3310304456.77-2532468.360000
31/03/201611101.2111101.21  0000
31/03/201612893926.1914121171.8910324971.84-2480644.940000
31/03/201612893928.4414121172.1910324971.84-2480644.940000
31/03/20165971097.276865585.262719493.661234459.30000
31/03/2016-2662.7-2662.7  0000
31/03/20165968434.576858028.3552719493.6612343120000
31/03/20165968434.576858118.8392719493.6612343120000
31/03/20163644079.833958831.833305972.27-392962.230000
31/03/2016584584  0000
31/03/20163644663.1883960652.5433305913.27-392962.230000
31/03/20163644663.833960573.1173305913.27-392962.230000
31/03/20162186415.172699268.081447707.98-689443.570000
31/03/2016-2893.54-2893.54  0000
31/03/20162183521.5332696806.3031447432.98-689443.570000
31/03/20162183521.632696806.4021447432.98-689443.570000
31/03/20164168666648893864.84  0000
31/03/20164168712948893720.46  0000
31/03/201682342408872781.99  0000
31/03/201682342408859971.11  0000
31/03/20162484723241.79  0000
31/03/20162548718241.4833  0000
31/03/2016122347764634086.1  0000
31/03/2016122338034611346.67  0000
31/03/2016687651390287.17  0000
31/03/2016688978390056.16  0000
31/03/20162005024900.19  0000
31/03/20162005025249.07  0000
31/03/2016222388334664.78  0000
31/03/2016222388333513.58  0000
31/03/2016  1483721.24-33802.80000
31/03/2016  1397097.79-74444.090000
Quentin
Super User

I'm sorry, I still don't understand what you want to do.  Often it helps to post sample data. If you have two datasets (Feb and March) as inputs, and you have a desired output dataset (WANT), I suggest you post all three.

 

That is, given a dataset FEB and a dataset MARCH as below (show 5-10 records from each), I want to create a dataset WANT as below (show all records and all varaibles that result from combining FEB and MARCH in the way you want).

 

If you clearly define the sample inputs and output, people should be better able to help.

 

 

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Reeza
Super User

How do you know which row in your Feb dataset line up with which row in Mar dataset?

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!

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
  • 7 replies
  • 950 views
  • 1 like
  • 3 in conversation