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 / Create a calendar with...
Power Apps
Answered

Create a calendar with public holiday in power apps

(0) ShareShare
ReportReport
Posted on by 50

Hi All.

 

I am trying to insert a public holiday for my leave request app, I already create the list separately on share point. And I have found this formula to calculate total leave taken except the public holiday. But every time I try to insert the formula, power apps giving me this alert. 

safiranrd_0-1712566434420.png

 

I think its the CountIF formula, bcs if I take out the CountIF formula, they dont give any alert

safiranrd_0-1712566701183.png

 

ID public holiday is my list, and holidaystart and holidayend is the start and the end date of the public holiday from my list

 

Any help is really appreciated, thanks!

 

Categories:
  • Verified answer
    Jiis Profile Picture
    254 Moderator on at

    Add ending parenthesis

     

    UpdateContext({daysdiff: RoundDown(DateDiff(StartDate.SelectedDate, EndDate.SelectedDate, Days) / 7, 0) * 5 + Mod(5 + Weekday(EndDate.SelectedDate) - Weekday(StartDate.SelectedDate), 5) - CountIf('2024 ID Public Holiday', HolidayStart >= StartDate.SelectedDate, HolidayEnd <= EndDate.SelectedDate)})

     

  • safiranrd Profile Picture
    50 on at

    Hi,

     

    Thank you for the suggestion! I have added ending parenthesis as you suggested, the alert is now gone but somehow this warning icon is still there

    safiranrd_0-1712571170635.png

    safiranrd_1-1712571191802.png

    any idea why?

  • Jiis Profile Picture
    254 Moderator on at

    Hello, i think it might be because CountIf function isnt delegable. If your datasource is bigger than 2000 records it wont work and if you do have a large dataset, you could use a Flow. Or you could filter them first out with delegable formula and then count them.

  • safiranrd Profile Picture
    50 on at

    the alert is still showing but its working perfectly, thanks!

  • Jiis Profile Picture
    254 Moderator on at

    Be careful with that, if your datasource '2024 ID Public Holiday' exceeds 500 records, it might not work correctly

    You can increase the limit to 2000 records from the settings.

  • safiranrd Profile Picture
    50 on at

    Since my data only have under 30 rows, I think it will be fine. Once again, thank you!

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 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard