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 Slide2.PNG](https://communities.sas.com/t5/image/serverpage/image-id/25378i323562D959FC6553/image-size/large?v=v2&px=999)
When you click the Year button 2016 the figures update to reflect the change:
![Slide3.PNG Slide3.PNG](https://communities.sas.com/t5/image/serverpage/image-id/25379iE31FF1C84C758DB6/image-size/large?v=v2&px=999)
And this is how it build:
![Slide11.PNG Slide11.PNG](https://communities.sas.com/t5/image/serverpage/image-id/25380i81D58EF2B1F8756C/image-size/large?v=v2&px=999)
![Slide5.PNG Slide5.PNG](https://communities.sas.com/t5/image/serverpage/image-id/25381i05675BE78EF625D0/image-size/large?v=v2&px=999)
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.PNG Slide8.PNG](https://communities.sas.com/t5/image/serverpage/image-id/25383i0D1205ED5D362ACC/image-size/large?v=v2&px=999)
![Slide9.PNG Slide9.PNG](https://communities.sas.com/t5/image/serverpage/image-id/25382i76FA9518BE1856C4/image-size/large?v=v2&px=999)
Best regards,
Petri
Senior Advisor