I have a table with information of several stores. The first column is the store name, the 2nd column is the identification of the micro market where the store is located, the 3rd column is the quality of the store (very good, good, medium or poor) and final column tells me the value of the micro market by store. I need to calculate the value of each micro market with a condition regarding the store quality.
Example:
I have a micro market with 6 stores. 2 good, 2 medium and 2 poor. This micro market is worth 100. If i split it evenly each store is supposed to be worth 100/6= 16.(6). But if i have in consideration the store quality it should be something like: For the good stores i multiply it with 1.2, for the medium for 1 and for the poor for 0.8. So the good stores would be worth 16.(6)*1.2=20, the medium 16.(6)*1, and the poor 16.(6)*0.8=13.(3)
my problem is that each mirco market has a different number of stores and each with different qualities. How can i have a solution that will allow me to do these computations "automatically"?
Thank you in advance
Bookmarks