Hello Experts,
I want to know the best way to establish if "info1" was updated between a range of dates and gets the dates that was updated in that line of time. Example of the table:
(Day 1) (Day2) (Day3) (Day4) ................
01jan2021 02jan2021 03jan2021 04Jan2021
info1 info1 info1 info1
For example: if "info1" changed in 03jan2021 and also in 04Jan2021, i want to obtain those dates and so on.
Thank so much for your help!
/*read dataset*/
proc import datafile='C:\Users\bsde0670\Desktop\test.xlsx'
out= have replace;
sheet='sheet1';
getnames=yes;
run;
/*transpose1*/
proc transpose data=have out=trans;
var day1-day4;
run;
/* if a data was update in a range of dates*/
data want;
set trans;
if '01JAN2021'd <= col1 <= '03JAN2021'd ;
run;
/*transpose2*/
proc transpose data=want out=want1;
var col1;
run;
I attached the example, what i want in this case is to obtain de date when the account change the value of the product. (Mark in yellow)
Thks Wen
what's your filtering? which observation you want to keep?
if you want check the result is not same for two datasets, recommand to use proc compare
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.