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 / Adding a day if select...
Power Apps
Unanswered

Adding a day if selected date is weekend or holiday

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have an application that in one part needs to calculate what date is 30 days after the choosen date and display it in second date picker. If the displayed date is on weekend or holiday, it needs to add dates to the next working date. 

 

I have solved this part with 

If(
 LookUp(colKalendar;Datum=Last(FirstN(colDateRange;brojDana)).Date;1)=1;
 Last(FirstN(colDateRange;brojDana)).Date+1;
 If(
 Weekday(Last(FirstN(colDateRange;brojDana)).Date;Monday)=6;
 Last(FirstN(colDateRange;brojDana)).Date+2;
 If(Weekday(Last(FirstN(colDateRange;brojDana)).Date;Monday)=7;
 Last(FirstN(colDateRange;brojDana)).Date+1;
 Last(FirstN(colDateRange;brojDana)).Date)))

 

And it works fine, the problem occurs when the holiday is e.g. on Friday or Monday, then the if statement finds only one condition and exits the evaluation.

 

 

 

Is there a way to run this if evaluation e.g. 3 times using the ForAll function or to continue evaluation even if the first condition is satisfied?

 

 

Categories:

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard