Welcome to the forums! We are currently trying to get all unanswered posts at least a reply...so here goes...
You can leverage a date and use that in a calculation - how to do it depends on your data.
Below in Superstore I am returning only Sales for September
I wonder if you can use this methodology to build out what you need...
Identify September's sales, cost and the various elements to get margin - work out a September margin and then use this separate field for your future month calculations
To make it dynamic - you can use TODAY() function in place of a fixed month..
If you could provide a sample with expected results I can try and take it a bit further...