Welcome to the community, @Amir_Banihashemi! :grinning_face_with_big_eyes: Your question doesn’t contain enough detail to effectively allow us to help. Is your base already designed? If so, please describe the relevant fields that would play into the calculation. Also please describe how you envision this working day-to-day (or period-to-period as the case may be). How much of this is manually driven? How much is automated? For the automated pieces, what needs to trigger the automation?
Long story short, the more detail that you can provide, the easier it will be to assist. :slightly_smiling_face: