Logic to Solve different companies mapping to SKU as input
I'm trying to solve the below logic but unable to; need your help on the same;
The below module applies to the list SKU. and maps to the company which is applicable based on the boolean.
I have input data sales price by SKU and by month and by all the company
Now, I would like to get the sales price by SKU by month and by company
SKU Code 123 belongs to the company DFA and FGA. Hence the Sales Price 33681 should be divided between these 2 companies for Apr 20.
SKU Code 789 belongs to only company DFA and sales price 34183 should be allocated only to Dec 20
SKU Code 356 belong to 3 company and sales price 32870 should be allocated to 3 companies (32870/3) for Dec 20.
Output module applies to SKU,Month, Company list
Any thoughts on how to solve this?