I am performing a sumifs operation in Excel and would need to replicate the same in Python.
Column 'E' in the below screenshot is my end requirement. For example, In AMS Territory: Product 1 Sales is 100K however upon adjustment it changes to 116,667. This is done in the following way:
AMS Territory:
((Sales of Product 1 in AMS)/(sales of product1 + product2 + product3 + product4 in AMS)) * (Sales of 'All' Product in AMS)
i.e.,
(100K/600K)*700K = 116,667
APAC Territory:
((Sales of Product 1 in APAC)/(sales of product1 + product2 + product3 + product4 in APAC)) * (Sales of 'All' Product in APAC
i.e.,
(200K/1000K)*1200K = 240,000