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

SAS VA YOY missing values

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

SAS VA YOY missing values

Hi,

 

I'm trying to do a 'Year over Year Growth' calculation in SAS Visual Analytics, using a date variable called 'peildatum' and a measure called 'Aantal spelers'. It keeps returning missing values and I have no Idea why. (see screenshot)

Could anyone tell me what could be a reason for this problem?

 

Thanks! 

Nicky


Accepted Solutions
Solution
‎07-10-2017 10:03 AM
SAS Super FREQ
Posts: 296

Re: SAS VA YOY missing values

Hi Nicky,

 

I believe the problem is that your date data item has the DDMMYYYY (or MMDDYYYY) format.

 

Details:

 

Spoiler

 

This is causing the aggregation to infer a daily time interval for periodic calculations, which returns missing for the ParallelPeriod operator (used by YOY Growth.) A daily interval is OK sometimes, however. 
See the bulleted list here: https://support.sas.com/documentation/cdl/en/vaug/69957/HTML/default/viewer.htm#n1lxnqfip132can1hdzu...

 

 

There are two ways to address the issue:

 

1. Edit the expression to change each instance of _Inferred_ to _ByMonth_ (or any value other than _Inferred_)

 

2. Delete the YOY calculation, then change the format of Peildatum to "Year", then create YOY Growth again.

 

Either of these approaches should work.

 

Hope that helps,

Sam

View solution in original post


All Replies
SAS Super FREQ
Posts: 296

Re: SAS VA YOY missing values

Hi Nicky,

 

I don't see your screenshot.

 

Period calculations like YOY will return missing if your report object uses a different date variable than the one that the calculation is based on. Could that be the issue?

 

Did you create Year over Year Growth automatically from the Data panel, or did you build the expression manually? That would help rule out some other possibilities.

 

Thanks,

Sam

New Contributor
Posts: 4

Re: SAS VA YOY missing values

Hi,

 

Thanks for your reply. I created YOY automatically. I tried to do it manually but I didn't really know the right way to do it.

 

I hope you can see my screenshot now.

 

 

YOY.PNG

SAS Super FREQ
Posts: 296

Re: SAS VA YOY missing values

I can see the screenshot now, thanks. Today is a holiday in the US but I will look into it tomorrow.

 

Thanks,

Sam

SAS Super FREQ
Posts: 296

Re: SAS VA YOY missing values

Hi Nicky,

Can you post the expression for your YOY aggregated measure?

Right-click the item in the Data pane and select Edit. Then, in the expression editor, select the Text tab.

You will see an expression like this:

( ParallelPeriod(_Sum_, 'Facility Employees'n, 'Transaction Year'n, _Inferred_, _ByYear_, 0, _ToToday_, {Date}) - ParallelPeriod(_Sum_, 'Facility Employees'n, 'Transaction Year'n, _Inferred_, _ByYear_, -1, _ToToday_, {Date}) ) / Abs(ParallelPeriod(_Sum_, 'Facility Employees'n, 'Transaction Year'n, _Inferred_, _ByYear_, -1, _ToToday_, {Date}))

That will help me to troubleshoot.

Thanks,
Sam
New Contributor
Posts: 4

Re: SAS VA YOY missing values

Hi,

 

Thanks for looking into it. 

Here's the code:

 

( ParallelPeriod(_Sum_, 'Aantal spelers'n, 'Peildatum'n, _Inferred_, _ByYear_, 0, _ToToday_, {Date}) - ParallelPeriod(_Sum_, 'Aantal spelers'n, 'Peildatum'n, _Inferred_, _ByYear_, -1, _ToToday_, {Date}) ) / Abs(ParallelPeriod(_Sum_, 'Aantal spelers'n, 'Peildatum'n, _Inferred_, _ByYear_, -1, _ToToday_, {Date}))

 

Hope you can find out what's wrong. I tried using YOY in several reports but it never works. Neither do other 'Create and add' calculations. 

 

Thanks! 

Nicky

Solution
‎07-10-2017 10:03 AM
SAS Super FREQ
Posts: 296

Re: SAS VA YOY missing values

Hi Nicky,

 

I believe the problem is that your date data item has the DDMMYYYY (or MMDDYYYY) format.

 

Details:

 

Spoiler

 

This is causing the aggregation to infer a daily time interval for periodic calculations, which returns missing for the ParallelPeriod operator (used by YOY Growth.) A daily interval is OK sometimes, however. 
See the bulleted list here: https://support.sas.com/documentation/cdl/en/vaug/69957/HTML/default/viewer.htm#n1lxnqfip132can1hdzu...

 

 

There are two ways to address the issue:

 

1. Edit the expression to change each instance of _Inferred_ to _ByMonth_ (or any value other than _Inferred_)

 

2. Delete the YOY calculation, then change the format of Peildatum to "Year", then create YOY Growth again.

 

Either of these approaches should work.

 

Hope that helps,

Sam

New Contributor
Posts: 4

Re: SAS VA YOY missing values

Hi, 

 

It works!

 

Thanks a lot,

Nicky

 

 

SAS Super FREQ
Posts: 296

Re: SAS VA YOY missing values

Great to hear it Nicky! Thanks for following up with us. Man Happy

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 362 views
  • 0 likes
  • 2 in conversation