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 / Calendar Event Filteri...
Power Apps
Answered

Calendar Event Filtering & Sorting

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello strange thing is happening (maybe by design).  I want to make a small 1 pager, that shows the next 3 calendar events, 3 flagged emails, etc..  a quick daily overview.

 

I have dropped in a Gallery and set Items = Filter(Office365Outlook.CalendarGetItems("Calendar").value,Start>=Now()).  This results in 3 events, however not sorted by date/time.  I tried wrapping a Sort() function around/in it but cannot seem to get it to work.  Ideally i want to sort and show the next three events that will occur from Now().

 

Then i also want to display a Label showing human readable relative times like "Your next event is in 39 minutes".  I am trying to achieve this with something like Text = Text(DateDiff(Now(),ThisItem.Start,Minutes),"[$-en-GB]hh:mm")

 

Ps.  I used color to represent code, as the Code formatter is not working.. I click it and nothing, at all, happens..

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have tried to upgrade toV2CalendarGetItems, but now receive this error. "An identifier was expected at position 9"

     

    I have tried playing with the $filter a bit, both dont work, returning the same error above.

     

    Office365Outlook.V2CalendarGetItems("Calendar",{'$filter': "Start gt " & Now()}).value

    Office365Outlook.V2CalendarGetItems("Calendar",{'$filter': "start gt " & Text(Now()) & "end lt " & Text(DateAdd(Now(),10,Days))}).value

  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I think this cannot be achieved so far. Because according to the documentation, the function won't return the Start time column. So you cannot use it to filter or sort. 

     

    If you need this, consider to submit an idea here:

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    Regards,

    Mona 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you - where in the Docs does it say that?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard