11-22-2017 12:58 AM
Hi everyone. Is there any way I can get a dataset with a column that has a number that varies row by row (which is a series of dates in the year), to display a total number today, and for each date (let's say there is a date for each week) the 'total' number decreases.
I cannot get the SUM to mathematically work out at all and this is driving me nuts. So in the spreadsheet I have used as an example, I have column A & B in the dataset already loaded in VA. How inside VA do I create column C?
I need to do it in VA to keep the data 'dynamic'. If I 'hard code it' in a spreadsheet and load it to VA, that will defeat the purpose of the report I am trying to create.
Thanks in advance.
11-22-2017 01:32 AM
I have never worked with SAS VA, but if you can run basic sas then:
1) sort your data by descending date.
2) run a step like:
data temp; set have; retain total 0; total + var_to_sum; run;
3) sort your data by date (ascending is the default).