How can I calculate the leave balance on a SharePoint list for each user?
The scenario is I want each user to be able to see their remaining leave on the list without having to first request their leave.
Tally's way is the simplest solution which will works perfect for simple calculation. Another option is to use flow. Make the leave balance list view only for the end users, then in the list where they submit leave request, add a flow triggered when new item is created.
Add days to the leave balance "days used" column in the leave balance list. This way you will not need to calculate the days used by hand.
Create a number column called
Leave - this is the total # days holiday the person has per year. Next create a number column, call it
Days Used. Then create a calculated column that returns a number - call it
If you don't want people to be able to edit this, give them read only permissions. The person that handles the holidays / processes payments should have contribute permission.