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

non standard calendar date reporting variables for retrieving last year/last period sales figures

Reply
Contributor
Posts: 59

non standard calendar date reporting variables for retrieving last year/last period sales figures

sas va 7.3 newbie

 

scenario:

i have a table with customer no,accounting period, accounting year, sales

i want to display a table with this info plus additional 2 columns on each row....one for sales last period same year, the other for sales same period last year. then i can show other calculations such as %diff, amount diff,etc.

 

we know how to build a view in sql to accomplish this.  can this be accomplished within VA using calculated or aggregated measures.?

thanks

Contributor
Posts: 30

Re: non standard calendar date reporting variables for retrieving last year/last period sales figure

Hii  Mhamlett,

 

As far as i understood let us say if you have Date value in date format in SASVA bring out year and month from it.

Create new Aggregated Measure and add Relative period function from Operators>> Period.

In place of Measure use what you want for eg here Sales and  Year in Date and Where you see a Zero Value please make it as '-1' This will give you the value of sales for  'June 2015' beside the period 'July2015' we say it as Previous Period for the year.

 

Try Paralell Period Operator for Same Month LastYear Sales values.

 

Let Me know If i answered your question.

 

Regards,

Karthik

 

Ask a Question
Discussion stats
  • 1 reply
  • 213 views
  • 0 likes
  • 2 in conversation