va 7.3
i am pulling sales from a data source that contains a date and sales amount.
i want to show the sales from yesterday with increase/descrease amount over the prior week/same day sales amount
ex. today is 06.15
i will show sales for 06.14 (tuesday) compared to sales 06.07 (tuesday).
trying to use derived item but no luck making this work.
month works cannot get the calculation to work with a day.
using inferred and -7 on the previous side of the calculation.
Hi mhamlett,
Have you tried to use the intck function?
data test;
days=intck('day','10jan16'd,'01jul16'd);
put days;
run;
With this function you can specify days, months, weeks... Using this function should be easy identify the dates comparing with actual day.
I usually take the actual day with
%let today = %qsysfunc(date(),yymmdd10.);
If you want to do that in SAS VA - just use the TreatAs function.
Try this post for some specific guidance:
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.