Hello All, Here i am having a data which contain a field status which varies with respect to date, what I want is find the dates on which its status get OFF and after getting OFF on which date if start working. data have; input key System_Date $ status $; datalines; 1 1-08-18 ON 1 2-08-18 OFF 1 3-08-18 OFF 1 4-08-18 OFF 1 5-08-18 OFF 2 1-08-18 ON 2 2-08-18 OFF 2 3-08-18 OFF 2 4-08-18 OFF 2 5-08-18 ON ; run; this is how I want the output key System_Date $ status $ red_date $ green_date $ 1 1-08-18 ON 1 2-08-18 OFF 2-08-18 1 3-08-18 OFF 2-08-18 1 4-08-18 OFF 2-08-18 1 5-08-18 OFF 2-08-18 2 1-08-18 ON 2 2-08-18 OFF 2-08-18 2 3-08-18 OFF 2-08-18 2 4-08-18 OFF 2-08-18 2 5-08-18 ON 2-08-18 5-08-18 Thanks in Advance.
... View more