There is a custom stat available for download from the
Repository which calculates contributed rake - you could import that and adapt it to do the calculation you want.
Custom Statistics and Reports FAQ
If you need further help please tell us where you are stuck, and exactly how you want to calculate the value of your stat.