I have the following data set(example). I want to calculate the count of a particular permno for a particular value of t. Eg: how many permno "123" are there for t=1,t=2 etc separately and store it in a third column. I want to count this for all permno. Kindly help. I tried using count if but it is giving me total count.
permno | t |
123 | 1 |
123 | 1 |
312 | 1 |
312 | 1 |
123 | 2 |
312 | 2 |
456 | 2 |
456 | 2 |
123 | 2 |
456 | 2 |
123 | 3 |
312 | 3 |
312 | 3 |
123 | 4 |
312 | 4 |
312 | 4 |
312 | 4 |
456 | 4 |
312 | 5 |
0 Response to help on counting with multiple criterias
Post a Comment