Custom Formula in Advance Statistic

Hello,
currently advance statistic is great. However, it will be better if we are able to define our own custom values.

For example, I have a table as following.
image

when i purchase item 1 , 3 times in a month and i would like to track average unit price / month by using graph in advance statistic.
with current setup, i am able to calculate only ( average of unit price ) ie 483. However, the actual average cost should be 472 instead.
therefore, if we are able to define a new variable in advance statistic , ie sum( total ) /sum(qty) , then we are able to get the true value in the graph.