Is this possible in EC? If something changes in the test result, it must continue to give the value "semi_start" within the test number in the column EG_RESULT
See example:
Thank you very much for the comments
Just a SAS datastep creating the data is easiest for "us". I'm using SAS on a remote server and though would have to upload any SAS file prior to using it.
Below Have table created via the EG import wizard.
DATA have;
LENGTH
TESTNUMBER 8
DATE 8
RESULT $ 4
EG_RESULT $ 10 ;
FORMAT
TESTNUMBER BEST12.
DATE DATE9.
RESULT $CHAR4.
EG_RESULT $CHAR10. ;
INFORMAT
TESTNUMBER BEST12.
DATE DATE9.
RESULT $CHAR4.
EG_RESULT $CHAR10. ;
INFILE DATALINES4
DLM='7F'x
MISSOVER
DSD ;
INPUT
TESTNUMBER : BEST32.
DATE : BEST32.
RESULT : $CHAR4.
EG_RESULT : $CHAR10. ;
DATALINES4;
112520870GOODstart
112520909GOODstart
112520940GOODstart
112521027GOODstart
112521109GOODstart
112521250GOODstart
112521361GOODstart
112521465GOODstart
112521549GOODstart
112521654GOODstart
112521703GOODstart
254820979GOODstart
254821026GOODstart
254821066GOODstart
254821158GOODstart
254821448XXXsemi_start
254821466XXXsemi_start
254821515XXXsemi_start
254821594XXXsemi_start
254821647XXXsemi_start
254821469GOODsemi_start
254821496GOODsemi_start
254821556GOODsemi_start
;;;;
data want;
set have;
by testnumber result notsorted;
length eg_result2 $10;
retain eg_result2;
if first.testnumber then eg_result2='start';
else if first.result then eg_result2='semi_start';
run;
proc print data=want noobs;
run;
Yes, it is possible.
Please provide more detail like sample data (not just a screenshot) and desired result. Below some guidelines how to ask a question which helps us to help you.
https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133
Thanks for your comment. I have added an excel file.
I have just added a sas table as an example 🙂
Just a SAS datastep creating the data is easiest for "us". I'm using SAS on a remote server and though would have to upload any SAS file prior to using it.
Below Have table created via the EG import wizard.
DATA have;
LENGTH
TESTNUMBER 8
DATE 8
RESULT $ 4
EG_RESULT $ 10 ;
FORMAT
TESTNUMBER BEST12.
DATE DATE9.
RESULT $CHAR4.
EG_RESULT $CHAR10. ;
INFORMAT
TESTNUMBER BEST12.
DATE DATE9.
RESULT $CHAR4.
EG_RESULT $CHAR10. ;
INFILE DATALINES4
DLM='7F'x
MISSOVER
DSD ;
INPUT
TESTNUMBER : BEST32.
DATE : BEST32.
RESULT : $CHAR4.
EG_RESULT : $CHAR10. ;
DATALINES4;
112520870GOODstart
112520909GOODstart
112520940GOODstart
112521027GOODstart
112521109GOODstart
112521250GOODstart
112521361GOODstart
112521465GOODstart
112521549GOODstart
112521654GOODstart
112521703GOODstart
254820979GOODstart
254821026GOODstart
254821066GOODstart
254821158GOODstart
254821448XXXsemi_start
254821466XXXsemi_start
254821515XXXsemi_start
254821594XXXsemi_start
254821647XXXsemi_start
254821469GOODsemi_start
254821496GOODsemi_start
254821556GOODsemi_start
;;;;
data want;
set have;
by testnumber result notsorted;
length eg_result2 $10;
retain eg_result2;
if first.testnumber then eg_result2='start';
else if first.result then eg_result2='semi_start';
run;
proc print data=want noobs;
run;
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.