Forum Discussion
Rolling vacation accrual help using either DAX or PowerQuery
I'm new to power BI and have the following problem I'm trying to solve.
My company operates a vacation accrual that stops when a limit has been reach and will recommence once the employee takes a vacation to take their entitlement below their limit.
- The rate of accrual (which is hours per month) varies by an employee.
- It starts from the 1st full month of employment and so if an employee starts on say 7/15, the accrual will only start from 8/1
- An employee will accrue vacation on a monthly basis until the limit is reached. The accrual will only start once an employee takes some vacation to take them below their limit
Attached are pictures of what the sample data inputs look like and what the desired result looks like.
- Anonymous6 years ago
SteveK66 - Please see attached pbix. Some of the key points in the Power Query solution are:
1. Using a function to run a process for each employee.
2. Using List.Accumulate to process month-to-month.
I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
1 Reply
- AnonymousNot applicable
SteveK66 - Please see attached pbix. Some of the key points in the Power Query solution are:
1. Using a function to run a process for each employee.
2. Using List.Accumulate to process month-to-month.
I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.