BookmarkSubscribeRSS Feed
tsetredst
Calcite | Level 5

Hi,

 

I am trying to create minute intervals using proc expand. I am using 'method=step' which works well for most of my variables, but I would like the value of one/or a number of the variables that are carried forward to be set to zero. 

 

I am aware of the convert/transform option but cannot seem to get this working as such.

 

My code looks something like this:

 

proc expand data = hk_floor.hk_a out=hk_floor.hk_aa to=minute method=step;
by _ric date_L_;
id time_l_;
run;

Thanks,

 

Ed

1 REPLY 1
ballardw
Super User

You may want to provide a brief example of some imput data and the desired result for the rules you need.

 

The phrase "like the value of one/or a number of the variables that are carried forward to be set to zero" really should reflect which variables have the need based on the syntax you show. Otherwise we are completely guessing as to what syntax change may be needed.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 747 views
  • 0 likes
  • 2 in conversation