I have to create a marketshare analyses for 2 company products compared to market competitors. Analyses is per company product, but only for countries where the product is already launched. I have salesdata per month, per country, per product for the specified market, with totals per country. The point is, if I want to make an analyses per month for all countries, I don't want to include the countries where the company product has not been launched yet in that month.
data looks something like:
So we have company product 1 and 2. And competitor products 1 and 2. In the Netherlands market in both january and february we have the company products, so there is no issue when we want to calculate market share.
But in France, only product 2 has been launched. So I don't want to include France in the calculation of marketshare over the complete regon for company product 1.
In Italy, company product 2 was launched in february so for regional analyses for company product 2, Italy should not be included in january, but should be included in february.
Market share definition being the sales of the company product for the month divided by the sum of sales for all products for the month, but only if there is data for the company product.
Any thoughts on how to accomplish this? I have been thinking of calculating an inclusion flag per country, product and month, but am not quite sure on how to implement it correctly and whether this is the way to go. Can't figure out a set analyses for this one either.
Anyone have a solution or hint to point me in the right direction??