BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
abdulla
Pyrite | Level 9

0001.jpg

Hi,

 

What I want is to fill the highlighted cell while merging with respective number in the cell. For example for the 1st row market_return will be 0.2487176983 and for the 1st 12 row adjusted_return will be 0.7965715684.  

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

So, all you need is to merge with newA instead of A

 

proc sql;
create table newA as
select 
    permno, 
    max(adjusted_return) as adjusted_return,
    max(market_return) as market_return
from A
group by permno;
quit;
PG

View solution in original post

5 REPLIES 5
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

https://communities.sas.com/t5/help/faqpage/faq-category-id/posting#posting

please post you haves and want into a form that others could reply to please.

 

 

andreas_lds
Jade | Level 19
Sorry, but I won't open any office documents poster in the internet. If you want help, post explain your problem including usable test-data and what you expect as result using {i} window.
abdulla
Pyrite | Level 9
I changed it
PGStats
Opal | Level 21

So, all you need is to merge with newA instead of A

 

proc sql;
create table newA as
select 
    permno, 
    max(adjusted_return) as adjusted_return,
    max(market_return) as market_return
from A
group by permno;
quit;
PG
Reeza
Super User

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

 


@abdulla wrote:

0001.jpg

Hi,

 

What I want is to fill the highlighted cell while merging with respective number in the cell. For example for the 1st row market_return will be 0.2487176983 and for the 1st 12 row adjusted_return will be 0.7965715684.  


 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2509 views
  • 4 likes
  • 5 in conversation