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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.