This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I am trying to get a running total for six months of data. Each month has its own line. I can use the running total function on January, although how can I get my February cumulative total to then begin with the last line of data in the January running total + the first line of the February column? I attached a picture to clarify below.
Try using a Transpose tool to get your column headers in one field and the data in the next rather than having the months run across as headers - then you can add a sort to get your months in the right order (might need to convert to datetime format first, or rename prior to transpose to 1, 2, 3 etc. for easy sorting), then use a Running Total tool on all values all at once! See attached for a simplified example.
Absolutely! The trick with this challenge is getting everything into the correct order before the running total. You'll want to transpose your data so that the months are listed vertically, then get all of January to list before all of February, etc., and then run your running total.
The Tile tool adds a unique value for each month (1 for Jan, 2 for Feb, 3 for March). You could easily use a formula tool to do the same. Then sort first on that numeric value for the month, and then the record ID. Don't set a grouping level, because grouping in the Running total tool will want to alphabetize for you.
Crosstab twice, one to get the original numbers, and one to get the cumulative totals. Then rename the totals columns, and join back together.