I have a report that will be published year to year and I'd like to cut down on the maintenance needed. I have a lot of aggregated measures for example.
Here's some sample code:
Sum [_ByGroup_] ('Ordered 2017'n) - Sum [_ByGroup_] ('Ordered 2016'n)
I have a chart which has the year as a category. So next year the columns will be 'Ordered 2018' and 'Ordered 2017'. Is it possible for me to do something that will dynamically adjust these column names in the code so that they're not hardcoded and will always be the current year and current year-1.
Thanks
SAS VA formulas can only be changed manually so you would be stuck with editing your code each year. Best practice in VA would be to use relative definitions like current year and last year.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.