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 date range with...
Power Apps
Answered

Filter date range with "OR" function

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all.

 

I have a SharePoint list that is published via a PowerApp. It has two date fileds, and I have created a filter only to show items that is between start and en date. I  goes like this:

 

Filter(OutOFOffice;Date>=StartDatePicker.SelectedDate&&Date<=EndDatePicker2.SelectedDate)

 

The challenge is that the EndDatePicker control is not mandatory, and my question is, can I use the "OR" function to filter if the EndDatePicker is empty or not? I am not quite sure how to manage this situation.

 

/Frank

Denmark

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Try this:

    Filter(OutOFOffice;Date>=StartDatePicker.SelectedDate && (IsBlank(EndDatePicker2.SelectedDate || Date<=EndDatePicker2.SelectedDate))

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PowerAddict THX for super quick reply. I will try this first thing in the morning 👍

     

    /Frank

    Denmark

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Sounds good! Keep me posted!

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi again @PowerAddict 

     

    Your suggestion was not quite what I ended up using, but you showed me the way, and that is just as important!!! After many trial/errors attempts, I ended up with this:

     

    Filter(DataSource; From <= Today() && (IsBlank(To) || To >= Today()))

     

    It seems that it is working like inteded, but I will test it the next days to see if it fits my organizations needs.

     

    Greeting from Denmark
    /Frank

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Keep me posted.

    Good luck with the rest of your app! Feel free to reach out in case of any questions!

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I wish I was as wise as you PowerApp gurus 🙏🙏🙏

    /Frank

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Keep playing with Power Apps, you will be wiser than everyone here! There are no limits!

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Please accept a reply as the solution so others can find it easily.

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard