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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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