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
Hi Nicky,
I believe the problem is that your date data item has the DDMMYYYY (or MMDDYYYY) format.
Details:
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
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
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.
I can see the screenshot now, thanks. Today is a holiday in the US but I will look into it tomorrow.
Thanks,
Sam
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
Hi Nicky,
I believe the problem is that your date data item has the DDMMYYYY (or MMDDYYYY) format.
Details:
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
Hi,
It works!
Thanks a lot,
Nicky
Great to hear it Nicky! Thanks for following up with us.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.