08-11-2016 11:10 AM
I have attached testdata.xls file.
Here is the issue, look at Obs # 1.
How can I make obs # 1 that should mimic to obs # 2 ?
Somehow file got corrupted, and contents splitted and shifted one column to the right in obs # 1 Column A (obs # 1),
Obs # 2 is correct way of representation of data.
In Obs # 1,
Salesman_name_dept should be : Michael Perry A001 Manufacturing
Sale_date should be : 10-Jan-09
Reorder should be : 50
Event should be : 10
BuySell should be : 45.45
Amount should be : 5000.75
Appreciate any help !
08-11-2016 03:43 PM
Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.
Use this link to create a data step that you can post as text or attach as a text file for better description of your data: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
It also helps to provide the layout of the expected results.
08-12-2016 01:51 AM
You can repair your data-set by overriding 1st observation values.
Pay attention to variables type: CHAR or NUM to write the correct values as correct litterals;
if _N_ = 1 then do;
Salesman_name_dept = "Michael Perry A001 Manufacturing";
Sale_date = '10Jan09'd;
Reorder = 50;
Event = 10;
BuySell = 45.45;
Amount = 5000.75;
Need further help from the community? Please ask a new question.