Hello there.
Is it possible to use this PROC inside a code transform in Data Studio (Something like the following code)?
proc tsmodel data={{_dp_inputCaslib}}.{{_dp_inputTable}} seasonality=7 outarray={{_dp_outputCaslib}}.{{_dp_outputTable}}(replace=YES); by var1 var2; id data interval=Day setmissing=0 FORMAT=_DATA_; var var3 / accumulate=total; run;
The documentation clearly states that CASL and DATA Step code languages are available to use, but as a noob I still struggle to identify which is which.
Thank You!
If the code runs fine in a "normal" SAS Studio session then I'd say yes. In any case no harm in trying.
Please attach the log, and maybe a print screen about the session table.
Sure thing. Here you go.
The screenshot below was taken after "successfully" running the code transform. By "successfully" I mean the plan ran without errors (log attached) but the session table didn't change. The expected result is shown on the next screenshot.
The screenshot below was taken in SAS StudioV and shows the expected result. This is the table I was expecting to see when running the code transform in the Data Studio plan.
This is the code inside the transform:
/* BEGIN data step with the output table data */ data {{_dp_outputTable}} (caslib={{_dp_outputCaslib}} promote="no"); /* Set the input set */ set {{_dp_inputTable}} (caslib={{_dp_inputCaslib}} ); /* END data step run */ run; proc means nway order=freq missing;proc means nway order=freq missing; class country; freq num_sold; output out={{_dp_outputCaslib}}.{{_dp_outputTable}}(drop=_type_ index=(country)) / levels; run;
Dataset used for testing: train.csv
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.