megera716
Board Regular
- Joined
- Jan 3, 2013
- Messages
- 146
- Office Version
- 365
- Platform
- Windows
I have a table of employees, their current wage and their historical wage with effective date. Our payroll system is....not great (for a multitude of reasons, which is why we're replacing it) and cannot report just the difference between their current wage and prior wage, so I know how much their last raise was.
I'm preparing raise budgets and I've got the most recent value for each employee (their current wage). I'm trying to look up each EE and return the wage they were at before their current one ("next-most recent") to find the difference between the two and the date of that raise.
See below for some anonymized data. I don't know why "Mickey" shows all these compensation "changes" when the rate isn't actually changing -- it's been $25/hour for the last 3 records (maybe there was some other variable that did change) -- but in Mickey's case, I'd want to return $3/hour (the difference between $22 and $25) and the date 1/1/2022, ignoring the 11/26/22. Daisy is pretty normal -- each date actually does show a change, but Minnie has not had a change at all (probably too new), so hers should return $0/"no change".
I sorted them in reverse chronological order but I can change that if needed.
I'm preparing raise budgets and I've got the most recent value for each employee (their current wage). I'm trying to look up each EE and return the wage they were at before their current one ("next-most recent") to find the difference between the two and the date of that raise.
See below for some anonymized data. I don't know why "Mickey" shows all these compensation "changes" when the rate isn't actually changing -- it's been $25/hour for the last 3 records (maybe there was some other variable that did change) -- but in Mickey's case, I'd want to return $3/hour (the difference between $22 and $25) and the date 1/1/2022, ignoring the 11/26/22. Daisy is pretty normal -- each date actually does show a change, but Minnie has not had a change at all (probably too new), so hers should return $0/"no change".
I sorted them in reverse chronological order but I can change that if needed.