Dear Statalisters,
I have a dataset which tracks individuals who work for different companies at different locations. Below is an example of my dataset with relevant information.
Company_ID Location_ID Year User_ID
01 335 2020 A115
01 336 2020 A226
01 336 2020 A226
03 387 2020 A335
I'm trying to figure out the number of employees registered every year under the combination of Company_ID and Location_ID to determine the size of every operation.
Is there a way to figure out the number of distinct User_ID under every combination and create another variable to store the information?
I have tried contract, distinct, but neither provides me with what I want.
Thank you guys so much!