Hi Jeferson, looking through our records, it looks like you may be a direct customer of our partner, TOTVS. They are familiar with your data model and should have first hand knowledge of how to create such metrics within their custom solutions.
I would also suggest to look through our classic docs on
locking aggregation, if you are working with pixel perfect.