I have the following data:
<tbody>
</tbody>
I would like to create a new value called Group Number that advances by 1 every time the Status Code of DP is encountered. The result should appear like the following:
<tbody>
</tbody>
I currently have the data within PowerPivot but could also do the calculation in Excel.
Thanks in advance for your help.
Event ID | Vehicle | Status Code |
P16039954 | 1102 | DP |
P16039954 | 1102 | AM |
P16039954 | 1102 | DP |
P16039954 | 1102 | AR |
P16039954 | 1102 | AM |
P16039954 | 1301 | DP |
P16039954 | 1301 | AM |
P16039955 | 1299 | DP |
P16039956 | 1299 | DP |
P16039956 | 1301 | DP |
<tbody>
</tbody>
I would like to create a new value called Group Number that advances by 1 every time the Status Code of DP is encountered. The result should appear like the following:
Event ID | Vehicle | Status Code | Group Number |
P16039954 | 1102 | DP | 1 |
P16039954 | 1102 | AM | 1 |
P16039954 | 1102 | DP | 2 |
P16039954 | 1102 | AR | 2 |
P16039954 | 1102 | AM | 2 |
P16039954 | 1301 | DP | 3 |
P16039954 | 1301 | AM | 3 |
P16039955 | 1299 | DP | 4 |
P16039956 | 1299 | DP | 5 |
P16039956 | 1301 | DP | 6 |
<tbody>
</tbody>
I currently have the data within PowerPivot but could also do the calculation in Excel.
Thanks in advance for your help.