Reputation: 161
I am trying to produce the below column ID_Error_Flag_Y_Count. Please see below data have and data want. Please see my attempt below.
I want to count how many times Error_Flag = Y by ID.
My Attempt: Create a pivot table by ID and where Error Flag = Y. Then VLOOKUP by ID and add the ID_Error_Flag_Y_Count to the original file. THis method works but I want to know if there is an easier way.
Data Have
ID Error Flag
1 Y
2 Y
3 N
3 Y
3 Y
This is what I want
Data Want
ID Error Flag ID_Error_Flag_Y_Count
1 Y 1
2 Y 1
3 N 2
3 Y 2
3 Y 2
Upvotes: 0
Views: 36