I am new developer in SAS VA. and I need to build a Chart to show Monthly total liabilities raised as well accumulative total liabilities raised in one chart. However, seems SAS VA only can cumulative from Jan to Dec, does not have option for the financial year.
As photo below, line chart is perfectly accumulated until Dec, then all of sudden drop in January, b'cos it is considering a new year. How can I fix that. many thanx.
This is a pretty big hole in the VA functionality, in my experience the majority of institutions use a non calendar year i.e. Academic or financial.
After struggling with this for a while I discovered there is a work around though its a bit of a fiddle.
You basically need to use the parallel period function to calculate the totals for all the previous periods (in my case I go back 2 years so have an aggregated measure for each of them)
I have aggreagated measures called:
current year
previous year
previous year2
You can then add them together, although be careful because VA doesnt seem to like them if they are blank so I used the following to create a final aggregated measure called total
IF ( 'Previous_Year2'n Missing )
RETURN (
IF ( 'Previous_Year'n Missing )
RETURN 'Current year'n
ELSE ( 'Previous_Year'n + 'Current year'n ) )
ELSE ( 'Previous_Year2'n + 'Previous_Year'n + 'Current year'n )
To prove it works, my outputs look like (notice the line carries over though Jan)
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.