BookmarkSubscribeRSS Feed
gaurav85
Fluorite | Level 6

I have two tables Country Name(Country and Name)  & Export/Import table ( Buyer or Importer and Seller or Exporter) and I want a third table or result set having export value or import value created from "value" column based on the buyer or seller name present group by country. The two tables and the result set is given below.

gaurav85_0-1643041884351.png

 

4 REPLIES 4
japelin
Rhodochrosite | Level 12

Please present the data in not an image but a form that can be reproduced in the data step like text or sas code with datalines.

gaurav85
Fluorite | Level 6

Name Year
Raj 1999
Rahul 2000
Rahul 2001
Rahul 2002
Sachin 2003
Suraj 2004
Harish 2005
Nihal 2006
Jim 2007
Jack 2008
Jack 2009
Jack 2010
Madan 2011
Madan 2012
Madan 2013


Name
Jack
Madan
Rahul

japelin
Rhodochrosite | Level 12
That would be the one in the other post.
Why don't you change the subject to something that completes the question so you don't make a mistake?
Reeza
Super User
Not possible as not all data is present.
Kim is listed in the Buyer column but not listed in the Country table. So your WANT data set does not have the correct inputs to be generated.
Also, please explain explicitly how the country is calculated - is it the buyers or sellers?
And how is Import Value or Export value determined? Why do some have values in both columns and others do not. What are the rules?

As already mentioned you need to present data as text.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 423 views
  • 2 likes
  • 3 in conversation