How to do simple calculations across multiple collections?

I have 2 collections Loans and Repayments.


On a dashboard chart. I want to display total lent amount minus the repayments.

I know I can do something via workflow whena new repayment is added then update the loan amount however I want to know if there’s a way to do this kind of simple calculation without workflows. The reason being I already have some data in the collections. The workflow would do it only for new items.

Not supported yet