BookmarkSubscribeRSS Feed
Decay2020
Fluorite | Level 6

Hi, I have below two tables. i want to populate the column ' Value' on the basis of 'previous year' and 'current year'. For example, A+ and A should have 20 as its value.

Now when the table1 is imported in SAS, SAS autmoatically rename the variable name, B- will become B_. Even if i import the data without renaming as per sas, it asks for sorting it while doing the transpose by grade.

Is there any way to go about this? Main goal is to populate 'value' using previous and current year. 

 

gradeA+AB-
A+222020
A242726
B-263432

 

previous yearcurrent yearValue
A+A?
AB-?
B-A+?
4 REPLIES 4
andreas_lds
Jade | Level 19

Is this a data mining question?

You are talking about "previous and current year" but i don't see a variable named "year" in your table. Start by posting the data you have in usable form, then show the expected results and explain the rules to be applied.

Decay2020
Fluorite | Level 6
row head is previous year and column head is current year.
ballardw
Super User

Time to start posting data examples in the form of a data step as shown in several responses to basically this exact same question in several of your other posts.

 

Make sure that any requirement like "previous year" or "current year" is either available from the variable names or details in the request.

Tom
Super User Tom
Super User

So you have posted two html tables (or spreadsheet tables) and not SAS datasets.

 

What does your actual SAS data look like? What are the names of the variables? How are they defined (numeric or character: if character maximum length: are any special formats like DATE or TIME applied?).

 

The first table you posted looks like a report you could generate from data that you have collected in the format  like the second table you posted.

 

If you don't have the data in SAS yet then what format is it in now? Text file? Something else?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1190 views
  • 0 likes
  • 4 in conversation