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 / If statement to return...
Power Apps
Unanswered

If statement to return time range records

(0) ShareShare
ReportReport
Posted on by

SherazadAhmed-6424 asked  16 hours ago | SherazadAhmed-3939 answered  1 sec ago
Actions

Hello,

I am customizing a SharePoint online form with PowerApps and trying to to display time ranges in a combo box based on the time ranges that apply. My original function to show all time ranges was "Distinct('Calls Booked', 'Appt Window')". I have two columns that apply to the upper and lower range in the window.

How do I structure my formula to show all time ranges that fall within the current time, whatever that is? Here is a sample of my data:

Data.PNG
Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @sher5817 are the appt window predefined categories or is it free text? if you have the time as 11:00 the first and second entries will be included, is that what you need?

  • sher5817 Profile Picture
    on at

    Hi rubin,

     

    The appointment windows are predefined. Please see the attachment for the sample data.

     

    thanks,

    Sherazad.

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    @sher5817 

     

    Here you go:

     

    add this to your combobox Item

    Set(_Range,
     With(
     {
     _now: Hour(Now())
     },
     Filter(yourDataSource, And(_now >= 'Start Time', 'End Time' <= _end)
     )
     )
    ) 

     

    Result

    range.gif

     

    hope it helps,

    R

  • sher5817 Profile Picture
    on at

    Hi Rubin, I was unable to get this formula to work. Where doe the _end come from? Is that a name of one of the columns?  And what is allowing you to show the data in the first column?

     

    thanks,

    Sherazad.

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

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard