If all of your data is related to a real date and can be reported in calendar month/days etc you can use the standard YearToDate function
First created a cross table with the month and dayOfMonth related to the transaction Date. (Just an example)
Then go to the Kg field in the data tab and right click the mouse for the options to select Create and YearToDate Using Date. (The transaction date)
Just drag in the new variable and thats it.
This is from SAS VA 6.3, but I am sure its must be almost the same.
Greetings and good luck.
Than it works the same way, but only you have to define a copied item of the Date to Month format.
Sadly I see that if you put year in front of the month, the calculations reset for every year. (I have no idea how to solve this within VA)
So I have no direct solution for the cumulation over the years. (Maybe someone else has a good idea how to solve this)
Anyway good luck.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.