I've built a SharePoint calendar that I'm using to track employee vacation time. The employee logs into a PowerApp, enters their information (including the amount of hours they are requesting off) and clicks a submit button. When the submit button is clicked a flow is triggered which generates a "Send an Email with options" to obtain the manager's approval.
What I'm trying to do is total the number of hours that an employee has already taken off for the current calendar year. The formula will need to look at 3 columns.
- Employee Name is the same as the employee requesting the time off
- Start Date = In current year
- Status = Approved
The return value should be the sum of the "Total Hours Used" column.
The idea is that the email that is sent to the manager should tell the manager how much time the employee has been approved to take off so far this year.
How can I accomplish that?