Inventory Calculation, need help

Hi!

I have been trying for days almost two weeks now, can’t get a crucial function to work, when it comes down to the calculation between dates that overlap.

I have an input field:
“Search for Products quanity:sum” - (minus)
“Search for Ordered Products quantity:sum”

Within the search of ordered products, I have the daterange overlaps fuction that point to the daterange I select and to the product.

So, If I have 6 of a thing(a Product) that is getting booked during different dates, I wanna see if the max value (6) is higher or lower during that period, this work’s to an extent, but when I try to view everything that is booked during a whole month, it calculate’s everything and then return everything that is booked, instead of just checking if the quantity number exceeds during the different time periods.

Can some please help me out here.
If this is a really advanced problem, I have no problem of hiring someone.

Thanks!