10-07-2016 03:19 AM
in VA 7.3 I'm looking at a table of web session data where each row is indicated by a session date, a unique session ID, and a dummy (1,0) variable called clicks (See also attached screenshot). I would like to create a line chart where for each day the percent of change from the previous day for the number of clicks (in my case the sum of clicks) is displayed.
I have experimented with the Aggregated Measures feature in Explorer (i.e., the RelativePeriod Periodic operator), but when I create such an aggregated measure and use the line plot visualization, I get only missing values. So, I'm not sure if it is possible using periodic operators for daily values. The User's Guide documentation lists conditions under which that operator returns missing values:
Note: Periodic operators return a missing value in the following scenarios:
data tmp; do session_id=1 to 10000; factor=int(ranuni(2)*700); session_date=date()-factor; if ranuni(1)>0.9 then click=1; else click=0; output; end; format session_date date9.; drop factor; run; proc sort data=tmp; by session_date;run;
10-12-2016 10:46 AM
You are correct. % change from previous day is not possible in VA.
Periodic Operators do NOT work on Daily data EXCEPT for Period To Date function.
The SAS VA Product Managers are aware of this feature request from customers and the hope is to have this supported in a future release.
Ted Stolarczyk, SAS Customer Loyalty team