turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- BI
- /
- Visual Analytics
- /
- Calculate a cumulative sum over a period longer th...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-19-2015 05:07 AM

Hello,

I want to create variables that calculate a cumulative sum (running sum) over a period longer than 1 year. Perhaps I'm doing something wrong, but using CumulativePeriod or the other options the Cumulative sum begins again from 0 as the year changes

Can anyone help me solve this.

Thanks in advance

Chris Keen

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-20-2015 04:51 PM

ChrisKeen,

My apologies--I accidentally marked your question "answered" by mistake. I'm currently having trouble undoing my mistake.

I believe it is possible for you to mark the question back to "unanswered." My posting this message will bump your question back up in the activity stream - hopefully someone will see and get you some help.

I'm sorry for the inconvenience. Thank you for being part of the community!

Communities Admin

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-25-2015 03:53 AM

Hi Chris,

I think you are trying to calculate cumulative sum for financial year, if yes, it is not possible to calculate in this way, you can do this using custom category, cumulative period is only for calendar year (i.e.., Jan - Dec).

Lets hope that this option (YTD) is available in VA 7.2.

You want to compare MOM?

Regards,

Teja Surapaneni.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-25-2015 04:20 AM

Hello Teja,

Thanks for your reply. I am trying to calculate for a periode, for example from 1-1-2014 to date (in february 2015 the periode to calculate is 1-1-2-14 to 1-2-2015, or in June 2015, the period should be 1-1-2014 - 1-6-2015).

Have you an example that shows me how I can manually calculate this.

Thanks again

Regrads

Chris keen

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-25-2015 08:09 AM

hi,

You Want Cumulative Sum or Overall Sum ?

Thanks,

Teja Surapaneni.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-25-2015 09:39 AM

Hi

I want a cumulative (running) sum - using my example in my the discussion meassge, from march 2014 til march 2015 without breaking and starting again from jan. 2015

Thansk again

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-02-2015 01:22 PM

I'm having the same problem. Stuff does accumulate from year to year sometimes, has anyone figured out how to convey this in VA?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-04-2015 01:28 PM

Hello jay and Chris,

There have been a few threads on this topic.

I asked a developer who supports the periodic operators about this, and he doesn't know of a workaround in the current release. This feature is definitely on our radar, so hopefully it can be implemented in a future release.

Thanks,

Sam

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-04-2015 01:40 PM

Thanks Sam for letting us know

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-03-2015 01:49 PM

Hi,

I have made a calculation for running sum over a period longer than 1 year like this:

1. **Data Set:** DATE (in MM/YYYY format); Value

2. + **Date2Year**=DateFromMDY(1, ( Month('DATE'n) + ( ( Year('DATE'n) - 2014 ) * 12 ) ), 2015)

3. + **Value2Year=**CumulativePeriod(_Sum_, 'Value'n, 'Date2Year'n, _Inferred_, _Inferred_, 0, _Full_, {Date})

4. + **No.=**'Date2Year'n. **Format display as Day of Month**. "No." is needed to replace "Date2Year" in the Table.

*Same technic I'm using for calculating: day to day difference, week to week difference, cumulative sum by days in week, etc.*

I hope it's clear and will help.

Robert R.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-29-2015 11:46 AM - edited 09-29-2015 11:54 AM

Hi,

I think you are limited to 365 values with this solution.

I have to do a cumulative with data on more than 1 year and one data per day.

I created date2year in SAS Base like this : date2year = '01jan2015:0:0:0'dt + datepart(date);

In Visual Analitics, i created value2year like : CumulativePeriod(_Sum_, 'Value', 'Date', _Inferred_, _Inferred_, 0, _Full_, {Date})

But value2year stays empty, I think this is due to the fact that date2year is in datetime format...

Have you any solution ?

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-30-2015 04:46 PM

Hi,

There is solution - but very, very slow for daily summing, better for month, good for quarter or year summing

**For e.g. data for 2014, 2015 years**

**"Quantity" - aggregated measure**

**"Date" - calendar data**

1. YearNo = Year('Date'n) *measure*

2. QtyYTD = CumulativePeriod(_Sum_, 'Qty'n, 'Date'n, _Inferred_, _ByYear_, 0, _Full_, {Date}) *aggregated*

3. QtyPrevYear = IF ( Avg [_ByGroup_] ('YearNo'n) = 2014 ) RETURN 0 ELSE ParallelPeriod(_Sum_, 'Qty'n, 'Date'n, _ByYear_, _ByYear_, -1, _Full_, {Date}) *aggregated*

4. Qty2YTD='QtyPrevYear'n + 'QtyYTD'n *aggregated - gives sum we are looking for*

Best Regards

Robert R.