Problem with adding a variable from another dataset.

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Noispaxen
Posts: 2
Joined: Wed Mar 09, 2016 8:18 am

Problem with adding a variable from another dataset.

Postby Noispaxen » Wed Mar 09, 2016 8:37 am

Hello,

First of all, sorry if the problem is too trivial, I have started using SPSS just very recently and am not very good at using it.
I am adding a new variable for same observations that are sorted by StockID and Year. The problem is, in the first file I have quaterly data for each StockID, while in the second file I only have end-of-year data, which results in the data merging only for the first date from that year, while I would like it to appear for every observation from the year.

Here are couple of screenshots to make it a bit clearer:
The new data:
Image
And the final data with the above already included on the right, but not the way I wish it was:
Image

Is there any simple way to make the last variable appear in every line?
Would really appreciate some help.

Cheers!
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Problem with adding a variable from another dataset.

Postby GerineL » Wed Mar 09, 2016 12:34 pm

could you post a picture of what you'd want it to look like?
in any case, i think you might be able to use the aggregate function with a break on ID/Year.
Noispaxen
Posts: 2
Joined: Wed Mar 09, 2016 8:18 am

Re: Problem with adding a variable from another dataset.

Postby Noispaxen » Sun Mar 13, 2016 7:24 am

GerineL wrote:could you post a picture of what you'd want it to look like?
in any case, i think you might be able to use the aggregate function with a break on ID/Year.
Yes, the aggregate function is excatly what I needed! Thank you very much!
(Turns out I could do some previous data input much easier too >_<)

Who is online

Users browsing this forum: No registered users and 1 guest

cron