Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SteveK66
Frequent Visitor

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.

DataInput.JPGDesiredResult.JPG

 

 

1 ACCEPTED SOLUTION
Anonymous
Not 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.

View solution in original post

1 REPLY 1
Anonymous
Not 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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.