I was able to solve this using the Toolbox plugin (Expression) and some javascript. Here’s what my Javascript looks like:
var array1 = [Search for Contacts:grouped by signup-date's count],
array2 = [Search for Contacts:grouped by cancel-date's count],
l = Math.max(array1.length, array2.length);
var step1 = Array(l);
for(var i=0; i<l; ++i) step1[i] = (array1[i] || 0) - (array2[i] || 0) ;
var step2 = step1.reduce(function(r, a) {
if (r.length > 0)
a += r[r.length - 1];
r.push(a);
return r;
}, []);
var step3 = Array();
for(var x=0; x<l; ++x) step3[x] = (step2[x] || 0) + Search for Contacts merged with Search for
Contacts merged with Search for Contacts:count;
step3;
I’m not too familiar with Javascript (I copied this from StackOverflow and tweaked a bit), but here’s the gist of how it works.
First, define an array1 as a list of COUNTS OF contacts who signed up between two dates. It’s important that this be a list of NUMBERS.
Then, define array2 as a list of COUNTS OF contacts who cancelled between two dates.
step1 takes each item in array1 and subtracts from it the number in array2 and saves it into a new array called step1. You could perform any math operation here that makes sense for you, and you could easily do it between more than 2 arrays by copying the above syntax. For example, you could do array1+array2/array3-array4 if that made sense for your use case. I haven’t experimented on different-sized lists. I’m not sure it would work if the lists were different sizes.
Then, step2 performs a cumulative sum of every item in step1. So if step1 was [4,5,3,1], step2 would be [4,9,12,13]
Finally, step3 just takes each number in step2 and adds to it the ‘beginning balance’. In my case, it’s a count of active users prior to the start date. The entire function then returns the values in the new list ‘step3’
I then use a chart element to make the categories the list of dates, and the values are the output from the expression described above and voila, you have a graph showing the cumulative change over time.
Hopefully this is helpful to anyone else trying to solve for this (or similar) problems.