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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create a calendar with...
Power Apps
Unanswered

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard