BookmarkSubscribeRSS Feed
PetriRoine
Pyrite | Level 9

What was our sales last year?

 

Have you ever heard that question? Well, I have and answering that question has never been simpler in SAS Visual Analytics. Some of the new capabilities introduced in Visual Analytics 8.x has made it possible to use great looking dynamic KPI objects to visualize f.ex. this years sales, last years sales and the change.

 

This is how the example report looks. I have used Crosstab as a control table to easily validate results.

Slide2.PNG

 

When you click the Year button 2016 the figures update to reflect the change:

 

Slide3.PNG

 

And this is how it build:

Slide11.PNGSlide5.PNG

 

Use ParallelPeriod aggregated measures or you can copy-paste formula from here: 

 

% change = 

# (current – previous)/current

( ParallelPeriod(_Sum_, 'In season'n, _IgnoreAllTimeFrameFilters_

, {Date|Datetime}, _Inferred_, _Inferred_, 0, _Full_, {Date}) -

ParallelPeriod(_Sum_, 'In season'n, _IgnoreAllTimeFrameFilters_,

{Date|Datetime}, _Inferred_, _Inferred_, -1, _Full_, {Date}) ) /

ParallelPeriod(_Sum_, 'In season'n, _IgnoreAllTimeFrameFilters_,

{Date|Datetime}, _Inferred_, _Inferred_, -1, _Full_, {Date})

 

Prev. season = 

ParallelPeriod(_Sum_, 'In season'n, _IgnoreAllTimeFrameFilters_,

{Date|Datetime}, _Inferred_, _Inferred_, -1, _Full_, {Date})

 

Slide8.PNGSlide9.PNGSlide10.PNG 

 

Best regards,

Petri

Senior Advisor

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Discussion stats
  • 0 replies
  • 860 views
  • 4 likes
  • 1 in conversation