Currently I am summing the record DSPD.Projection and evaluating of group on DSPD.ProcedureID. This works well unless someone makes an update the Projection column and instead of updating the record, it creates a new row with the same ShiftID, ProcedureID, Projection, Performed.
I'm assuming a formula will need to be written to not only evaluate on the same group, but also take into account the column MostRecent and only pull numbers where MostRecent = 1.
ShiftID | ProcedureID | Projection | Performed | MostRecent |
---|---|---|---|---|
633822 | 1 | 30 | 0 | 0 |
633822 | 1 | 30 | 0 | 0 |
633822 | 1 | 39 | 0 | 0 |
633822 | 1 | 30 | 0 | 1 |
633824 | 1 | 24 | 0 | 0 |
633824 | 1 | 30 | 0 | 0 |
633824 | 1 | 46 | 0 | 0 |
633824 | 1 | 33 | 0 | 1 |
652278 | 1 | 30 | 0 | 1 |
Any suggestions on how to do this?
Thanks,