BookmarkSubscribeRSS Feed
roberto_marques
Calcite | Level 5

In SAS-VA 7.4 I need to add values of 12 months and present them by four months, but with some conditions:
1. I cannot use parameters, as the results must be calculated and presented every four months on all records in the database;
2. In a universe of several items, I must separate 2 items and add them, but each item has a different sum shape. Each quarter corresponds to the sum of 12 months.
Item 1
- 1st Quarter of the year considered (e.g. from 5/1/2018 to 4/30/2019): I must add only the values corresponding to the months of 2019;
- 2nd Quarter of the year considered (e.g. 9/1/2018 to 8/31/2019): I must add only the values corresponding to the months of the year 2019 (same rule as the 1st Quarter).
- 3rd Quarter of the year considered (e.g. 1/1/2019 to 12/31/2019): I must consider the value of January of the following year. In the example above, the value for the 3rd quarter will be January 2020.
Item 2
- For calculation in any quarter, we consider the sum of the values of each month - e.g.: 2nd Quarter of 2019: I must add the values from September 2018 to August 2019.

The value to be displayed will be the sum of items 1 and 2.

The sum of Item 1 I can do with the RelativePeriod or CumulativePeriod function, but the sum of item 2 I can't do.

Please ask anyone who can help me.

 

roberto_marques_0-1599254158544.png

 

 

1 REPLY 1
roberto_marques
Calcite | Level 5

Sorry, I made a mistake - my question is this: the sum of Item 2 I can do with the RelativePeriod or CumulativePeriod function, but the sum of item 1 I can't do.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 1 reply
  • 583 views
  • 0 likes
  • 1 in conversation