Find the minimum contract quantity falling within a contract range
Hope you all are having a good day so far.
I would like to identify the least contract quantity falling within a price list range. if 10 contract quantities fall within a price range then I would like to choose the least from it. The catch is that the contract quantity is a calculated value and it is calculated for all the weeks in a year from the current week for all the vendor, material and plant combinations. Please find the attachments for the sample inputs and the expected output.
Requesting a solution for this problem statement