BookmarkSubscribeRSS Feed
Fluorite | Level 6

Hi all,

is it possible to create a cumulative average for all past times?

I have only found the option to do this with relative dates. But if I have a dataset of multiple years I cannot put all the months in manually.

At each step it must include all previous values but not future ones. I can't aggregate on cell level because I cannot name a unique identifier.


Thank you very much!


The data set might look like this:

Date             Measure  Wanted
01/01/2016  0.15          0.15

01/02/2016  0.20          0.175 ((0.15+0.20)/2)




01/03/2017  0.05         Sum(Measure(where date is before current date))/n

Pyrite | Level 9

Hello @jrippberger ,


Does this look something you are after? (Done in VA 8.5)



My source data had two columns: Date, Measure

I created a new measure Cumulative Sum by creating a Derived Item

  1. In the Data pane, right-click the Measure data item and selected New calculation.
  2. Give a sensible Name and specify the Type: Cumulative Total
  3. Click OK.


I hope this helps.


Best regards,


Fluorite | Level 6
Hi Petri,

thanks for your answer. That would indeed help very much since I would only have to divide this by the cumulative total of the count of events.
But I don't seem to have that option:
My VA does only display the following options for type (i translated them from german to english):
Difference to the same interval in the past
Difference to a interval in the past
Difference to the same interval in the past - percent
Difference to a interval in the past - percent
Percent of Sum - Counts
cumulative periodic value
growth comparison
cumulative year value
cumulative year growth.

So somehow VA will only let me cumulate my values by specific time intervals not "total".
Although it seems I only have access to the SAS release 7.5 which is unfortunate.

Best regards,
Pyrite | Level 9

Visual Analytics 8.2 introduced new one-click calculations including (the one I used) cumulative total (which can work across any dimension), moving average, and data suppression (which obscures an aggregated measure value if detail measure values could be easily inferred when too few rows contribute to the aggregated measure value). Although version VA 7.5 inherited great things from VA on Viya, apparently these one-click calculations were not on the list. 


Best regards,





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. 

Register now!

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
  • 3 replies
  • 2 in conversation