Established User
Posts: 1

# Calculate a cumulative sum over the the largest peariod available in the data

Hi,

I am new with VA

I would like to represent an increasing curve over time that represent cumulative values for years ( 10 years )..

To build my variable I used :

CumulativePeriod(_Sum_, "Mesure", Date , _Inferred_, _ByYear_, 0, _Full_, )

but The cumulativeperiod function calculates only over one year.

PS: the depth of the historical data available is not fixed,it depends on an other categorie variable..

Occasional Contributor
Posts: 5

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Posted in reply to AsmaFejjari

Hi Asma

I'm new to VA too. This is the first thing I tried to do. And then I find it can't even perform a basic cumulative function over more than a year.

The mind boggles.

Frequent Contributor
Posts: 131

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Have a look at my post in this thread should give you what you need,

you basically have to calculate each year separately  then add together

Occasional Contributor
Posts: 5

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Posted in reply to AsmaFejjari
Thank you! I'll give that a try. Just to clarify for my newbie brain, how does one create aggregate measures of prior years?
Frequent Contributor
Posts: 131

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Hi,

Theres guidance here on creating cumulative period data, you will just need to adjust item 6 in the first image shown in that link to pick how many years to go back, -1,-2 etc

Occasional Contributor
Posts: 5

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Posted in reply to AsmaFejjari
Thank you, much appreciated!
Frequent Contributor
Posts: 131

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Let us know how you get on

Don't forget to mark the thread as solved if the suggestion works

Occasional Contributor
Posts: 5

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Posted in reply to itchyeyeballs

Thanks for the advice, I gave it a fair crack, but didn't have any luck. It's far too fiddly for what should be very basic functionality within VA.

Frequent Contributor
Posts: 131

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Let us know where you hit problems,

I'm not one to pull my punches with VA (Think it lacks in several key areas) but in this case I'm not sure it would be any easier in competitor products as they all seem to work over one year periods and therefore need some fiddling

Occasional Contributor
Posts: 5

## Re: Calculate a cumulative sum over the the largest peariod available in the data

[ Edited ]
Posted in reply to itchyeyeballs

In Tableau it is simple as creating a running total table calculation. There is no arbitrary time limit, and would would there be? It makes no sense.

I'm not having much luck creating the previous year aggregations in your solution, I'm also confused as to whether your solution uses the parallel period function or the cumulative period function, or some combination of both.

Frequent Contributor
Posts: 131

## Re: Calculate a cumulative sum over the the largest peariod available in the data

Hi,

I used the parallel period function for each preceding year and added them together.

Discussion stats
• 10 replies
• 870 views
• 0 likes
• 3 in conversation