web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Day Counter: Co...
Power Apps
Unanswered

Custom Day Counter: Counts working days, Excluding holidays +

(0) ShareShare
ReportReport
Posted on by

*New to Power Apps*

 

I work in a training department and we receive a new class every so often (no set time frame) it is possible for the classes to overlap. I am designing an app with a dual interface: for the Trainees and for the Supervisor.

 

The Trainees will see the agenda items based on which day they are on in the training period. The training is 7 weeks long and each training class has the same agenda for the 7 week duration. I have started an Excell sheet with the agenda items for just the first 5 days. 

 

The Supervisor will see the future Trainee list and will select the Trainee's start date within the app. At which point I would like the app to calculate the end date and number each of the working days within the 7 week span. Then the agenda items will auto populate for each new training class based on the day.

 

Problem: We work a recurring comp day schedule, we work every 3rd Saturday and get the following Wednesday off. So: 

 

Week1: Mon, Tue, Thur, Fri (Days 1-4)

Week2: Mon-Fri (Days 5-9)

Week3: Mon-Sat (Days 10-15)

Week4: Mon, Tue, Thur, Fri (Days 16-19)

Week5: Mon-Fri (Days 20-24)

Week6: Mon-Sat (Days 25-30)

Week7: Mon, Tue, Thur, Fri  (Days 31-34)

 

Essentially a 4 day week, a 5 day week then a 6 day week, repeat.

 

Our first working Saturday is 09/17/22 then off Wednesday 09/21/22. Then regular biz days until Saturday 10/08/22 then off Wednesday 10/12/22, etc.

 

I would love for the supervisor to simply pick a start date and let Power Apps (or Excell) do the rest. It needs to be a recurring schedule because each class will start at a different time in relation to the rotatating working Saturday. 

 

It may be best to have the function running in the Excell spreadsheet with the agenda items and have it change the table headers to the specified date after mapping out all working days.

 

I am also generally thinking I may just need to create a 4 week cycle and manually select the off days then some how turn that into a recurring calender within the app. Then also implementing the Holidays

 

Here is currently what I have calculating working days in Power apps. And a snip of the holiday calculator through excell (this auto calculates what days the holidays will fall on regardless of the year). And finaly the table including the agenda Items for the first 5 days.

 

(Also small detail, the counter I currently have functioning is either not counting the start date or the end date, not sure if that would be necessary for this to function properly)

 

RoundDown(DateDiff(dps6startdate.SelectedDate, dps6enddate.SelectedDate, Days) / 7, 0) * 5 +
Mod(5 + Weekday(dps6enddate.SelectedDate) - Weekday(dps6startdate.SelectedDate), 5) -
CountIf(holidays, Date >= dps6startdate.SelectedDate, Date <= dps6enddate.SelectedDate)

 

powerappdaycount.png

 

 

 

 

 

 

Screen Shot 2022-08-24 at 8.49.15 PM.pngagendaitems.png

 

 

 

 

 

xholiday calculator.png
agendaitems.png
powerappdaycount.png
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard