Calculating Average Time with Time Tracking

Hi all, I’m right now trying to make a dashboard element which Displays two stats.

One is for the average time it takes for a Activity to go from time posted to in progress, and the other is for for the average time to complete a Activity from time posted to completion. I have the timers all automated so that they start when they are posted to the Board and as status changes happen they pause appropriately.

I am now trying to figure out how to compile this information to take the average of all paused timers for the dashboard. I am having much difficulty in figuring that out since the items are split across three groups. There also isn’t an easy way I can figure out to calculate the average based only on the timers which are stopped and not include timers that are still running since they resolve as zero values adding garbage data.