# DAX formula for cumulative number/percent



## Paul-NYS (Aug 26, 2013)

Hi
I have a data set that I load into Excel 2010's Powerpivot window and then pivot over it in Excel. For pivoting, I have been using DAX functions to create various aggregations by creating Measures within the pivot table.

However, I do not know how to create a cumulative numbers using DAX functions. I have a column for 'exit month category' that contains a value 

(6, 12, 18, 24, 30...) that represents the month (in six month increments) a child exited from the court system. I have a bar chart that displays the exit month category on the X-axis. 

However, using DAX or some other Excel formula, does anyone know how I can get the record counts to aggregate as they move down the X-axis from left to right?

There doesn't seem to be a way to upload an example file, so I can't show you.

Paul


----------



## cajste (Aug 26, 2013)

Don't have English excel in front of me right now, but try right click at somewhere in column that you want to apply that change on in the pivot table, choose Value field properties (or something like that, 3:rd from the bottom). Then choose the tab Show value as and in the drop list choose Running total. Not a DAX solution but it should work for you.

//Caj


----------



## Paul-NYS (Aug 26, 2013)

Hi Cajste
You are right, that definitely works for a table. The problem is that I am using a bar chart and need it to display cumulatively here.

Paul


----------



## cajste (Aug 27, 2013)

Hi Paul,

The issue has been discussed in different blogs, hope one of the below links answer your question!

//Caj

Running Total Techniques in DAX | Javier Guillén 
DAX: Running Totals | Chris Webb's BI Blog 
Use Time intelligence functions to do a running sum of the last 6 months with PowerPivot « PowerPivotPro


----------



## cajste (Aug 27, 2013)

Hi Paul,

The issue has been discussed in different blogs, hope one of the below links answer your question!

//Caj

Running Total Techniques in DAX | Javier Guillén 
DAX: Running Totals | Chris Webb's BI Blog 
Use Time intelligence functions to do a running sum of the last 6 months with PowerPivot « PowerPivotPro


----------



## Paul-NYS (Aug 27, 2013)

Hi Caj
Thanks a lot. I actually had found the Javier blog yesterday, but could not get what he stated to work. This morning I was able to get it to cumulate, but have a different problem now though. If I can't resolve it, I will post it in a new thread.

Paul


----------

