This was most helpful! I took me a minute to understand, this is the closest I've gotten, seriously thank you! There is an issue with it bringing over every row though. I'm not sure what the problem is, it may be with the Table join. I've tried working on this thing for hours and I can't get it.
... View more
I put in the portion of the data set I'm working with on this thread above. Can you maybe use that with the same equation so I can take a look? thanks
... View more
for the data lines portion, would I need to put each in individually because I have several million data points. is the * next to select a part of the equation or is there somehting else that is supposed to go there? Would I put this into the "advanced expression" area?
... View more
Sorry. What was confusing about my my question? I do have some questions: Would I just type in this code into the "advanced expression" section? Is the * next to A a part of the equation or does it signify something else? What is "have?" Is it the final expression "on" which creates the new column? thanks again. I apologize if these questions are rudementary.
... View more
Version SAS Enterprise Guide 4.3 Attempting to compute new column showing household data for individuals as part of a project using Census data. I am using the "query builder function" select "computed columns" select "new" select "advanced expression" where it brings up "enter an expression" Each row is a different individual. t1.serialno is the family code, t1.wagp is the individual's wages for the year I am using. Complementary relationship (RELP) is calculated as follows: CASE WHEN 0 = t1.RELP THEN 1 WHEN 13 = t1.RELP THEN 1 WHEN 6 = t1.RELP THEN 1 WHEN t1.RELP >= 14 AND t1.RELP <= 17 THEN 0 WHEN t1.RELP >= 2 AND t1.RELP <= 5 THEN 0 WHEN t1.RELP >= 7 AND t1.RELP <= 12 THEN 0 ELSE t1.RELP END) I am looking to find the sum of the wages of all those with a certain family code for each individual in that family who holds a certain relationship to the person who filled out the survey. I am trying to create a "household income" column. see below An example t1.serialno t1.wagp Complementary Relationship "Household Income" 1 20 1 30 1 40 0 30 1 10 1 30 2 30 1 30 2 15 0 30 2 0 1 30 3 35 0 20 3 10 1 20 3 10 1 20 I am brand new to SAS and any help would be great! Thanks! Tom
... View more
Here is the basic idea: 1 2 3 Goal Person 1 Household 1 Wages - 10 Household 1 Wages - 20 Person 2 Household 2 Wages - 10 Household 2 Wages - 10 Person 3 Household 1 Wages - 10 Household 1 Wages - 20 I'm trying to write an If/then statement that would search throughout all of column 2 to find similar household #'s and then find the sum and put them in the "goal column." Would appreciate your help!
... View more