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 / Filter on Calendar fro...
Power Apps
Answered

Filter on Calendar from 3 columns within SharePoint List

(0) ShareShare
ReportReport
Posted on by 31

I've got a calendar in a canvas app which is linked to a SharePoint list. I want the calendar to show if there are items booked on that day. There are 3 columns in the SharePoint list called 'Start Date', 'Second Date' and 'Third Date'. I'm using the below formula which shows any items that has all 3 dates. When it only has a 'Start Date' and 'Second Date', the items do not show and I can't work out how to change the formula so it looks at the 'Second Date' column. 

 

CountRows(
Filter(
'SharePoint List Name',
DateAdd(
_firstDayInView,
ThisItem.Value
) >= 'Start Date' && DateAdd(
_firstDayInView,
ThisItem.Value
) <= 'Third Date'
)
)

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @M1stopher_Chris 

     

    please try this:

    CountRows(
     Filter(
     'SharePoint List Name',
     DateAdd(_firstDayInView, ThisItem.Value, Days) >= DateTimeValue(Text('Start Date')) &&
     (
     (IsBlank('Third Date') && DateAdd(_firstDayInView, ThisItem.Value, Days) <= DateTimeValue(Text('Second Date'))) ||
     (!IsBlank('Third Date') && DateAdd(_firstDayInView, ThisItem.Value, Days) <= DateTimeValue(Text('Third Date')))
     )
     )
    )

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • Verified answer
    M1stopher_Chris Profile Picture
    31 on at

    Hi @mmbr1606 Thanks for the quick response. It works if I remove each of the 'Days' part of the formula, not 100% sure why that makes a difference.

     

    Is there a way of amending the formula so it doesn't use CountRows so I can get away from the delegation warning?

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    Try thisinstead

     

     

    ClearCollect(
    FilteredItems,
    Filter(
    'SharePoint List Name',
    DateAdd(_firstDayInView, ThisItem.Value) >= DateTimeValue(Text('Start Date')) &&
    (
    (IsBlank('Third Date') && DateAdd(_firstDayInView, ThisItem.Value) <= DateTimeValue(Text('Second Date'))) ||
    (!IsBlank('Third Date') && DateAdd(_firstDayInView, ThisItem.Value) <= DateTimeValue(Text('Third Date')))
    )
    )
    );

    // To get the count
    CountRows(FilteredItems)

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • M1stopher_Chris Profile Picture
    31 on at

    It's not showing any dates on the calendar and still showing a delegation warning. 

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    Lets try this

     

    Put this in the onvisible of first screen:

    Set(startDate, DateTimeValue(Text('Start Date')));
    Set(endDate, If(IsBlank('Third Date'), DateTimeValue(Text('Second Date')), DateTimeValue(Text('Third Date'))));

     

     

    And this as filter:

     

    ClearCollect(

        FilteredItems,

        Filter(

            'SharePoint List Name',

            DateAdd(_firstDayInView, ThisItem.Value) >= startDate && 

            DateAdd(_firstDayInView, ThisItem.Value) <= endDate

        )

    );

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • M1stopher_Chris Profile Picture
    31 on at

    Thanks for trying but it doesn't seem to like it.

     

    OnVisible currently I have the below. I tried adding the additional bit you provided and it provided an error saying that the Start Date wasn't recognised. I also took out my original code and replaced with your suggestion and it didn't like that either.

     

    /*resets calendar view and date selection to today*/
    Set(_dateSelected, Today());
    Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), TimeUnit.Days));
    Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), TimeUnit.Days));
    Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, TimeUnit.Months), -1, TimeUnit.Days));
    Set(_calendarVisible,true)

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 408

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 319

Last 30 days Overall leaderboard