Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Compare relative week & format weekv

Senior User
Posts: 1

Compare relative week & format weekv

Hi all,


A VA user would like to see the comparison between the revenue of a certain week and the revenue of the week before. I am looking for the easiest solution and preferably without touching the ETL process. I read some SAS notes, blog posts and the community and tried to make a summary. I did not find the time yet to test the 2 solutions but am curious to see if there are alternate


Situation as is:
Nightly ETL job with hourly incrementals during the day. Windows scheduler which runs a .sas file and result is written to SAS LASR library.
Report with

  • Columns: Week (category)
  • Rows: branches 
  • Measures: revenue


New Aggregated Measure
      RelativePeriod: (Sum, Revenue, Weeknumber, Inferred, 0, full)/(Sum, Revenue, Weeknumber, Inferred, -1, full)
Report with 2 measures: revenue, revenue week-1


For the moment, there is only a DDMMYY time category. We need a new time category with a WEEKV format.



  • ETL: Add new column to data set with a weekv format applied to.
  • Add format to format catalog (-> restart ObjectSpawner?) -> Duplicate of time category in VA -> Apply format & rename
  • ???



Extract of information I found:

Michelle: Not all BASE SAS date formats are supported in SAS Visual Analytics and as you've found the WEEKDATEw. format isn't available. You may need to do your calculations as part of your data preparation prior to loading.

Calculate a moving average using periodic operators in SAS Visual Analytics Designer - By Bobbie Wag...


Extra question:

The interval for which the values are aggregated. For example, specify _ByMonth_ as the interval to aggregate the year-to-date values for each month.

Select one of the following:
specifies that the interval is determined automatically from the visualization or report object that displays the aggregated item.


Does anybody have experience with this? How good is the performance of the 'automatically' determination?


Thanks in advance,



Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation