Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
john_henry
Contributor III
Contributor III

How to create/calculate a cumulative measure for Sales?

I am trying to create a line chart that is a cumulative measure of sales at any given period. For example, using sample data below, if I selected year 2015 in my filter, I would get an upward sloping line that summed up all prior and current sales for any given month in 2015.  So for the month of Mar 2015, I would get cumulative sales of $30 (10+5+15).

 

YearQtrMonthSales
2015Q1Jan10
2015Q1Feb5
2015Q1Mar15
2015Q2Apr20
2015Q2May35
2015Q2Jun60
2015Q3Jul20
2015Q3Aug50
2015Q3Sep40
2015Q4Oct30
2015Q4Nov75
2015Q4Dec80
2016Q1Jan10
2016Q1Feb10
2016Q1Mar30
2016Q2Apr40
2016Q2May70
2016Q2Jun120
2016Q3Jul40
2016Q3Aug100
2016Q3Sep80
2016Q4Oct60
2016Q4Nov150
2016Q4Dec160
2 Replies
handry_orozco
Partner - Contributor III
Partner - Contributor III

Hi

try

=RangeSum(Above(TOTAL Sum(Sales), 0, RowNo(TOTAL)))



john_henry
Contributor III
Contributor III
Author

getting close, but not working fully yet.  Does my raw data table have to be in sequential order?  I have a lot of different dimensions in my data and so the data is not necessarily in order.  I have grouping dimensions (ie, categories/hierarchies) that may be complicating things