You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
Lao:
too broad questions seldom usually receive few/no replies.
Please provide the list with more details about your query: help others help yourself! Thanks.
You need to follow Carlo's suggestion and the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.
This may be what you want:
bysort industry: egen totalsales=total(sales),
g mktshare=sales/totalsales
Comment