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

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Issue Filtering Dates Across Two Years in Power Apps

(0) ShareShare
ReportReport
Posted on by 4

Hi Community!

I’m encountering an issue when trying to filter records between two dates in Power Apps. The filter doesn’t return the expected results when the date range spans across the end of one year (e.g., December 2024) and the beginning of the next year (e.g., January 2025).

Here’s the filter formula I’m using:

ClearCollect(
    ColFiltrados,
    Filter(
        CONTROLE_EMBARQUE_ATT_2,
        // ETD (Date range filter)
        IsBlank(Dt_ETD_DE_12.SelectedDate) Or
        IsBlank(Dt_ETD_ATE_12.SelectedDate) Or
        (DateValue(ETDPrev) >= Dt_ETD_DE_12.SelectedDate And DateValue(ETDPrev) <= Dt_ETD_ATE_12.SelectedDate)
    )
)
 

Additional Information:

  • The ETDPrev column in the database is formatted as Date.
  • The controls Dt_ETD_DE_12 and Dt_ETD_ATE_12 are DatePicker controls in Power Apps.
  • The filter works correctly for dates within the same year but fails when the range spans two different years (e.g., 12/15/2024 to 01/10/2025).
  • I’ve tried using DateValue to ensure the values are treated as dates, but the issue persists.

What I Need:

I need the filter to work properly for ranges that span across two years. Has anyone faced a similar issue or knows how to fix this?

Thanks in advance for your help! 😊

Categories:
I have the same question (0)
  • AndrianaO Profile Picture
    213 Moderator on at
    Issue Filtering Dates Across Two Years in Power Apps
    Hi! Can you share the example of ETDPrev
    I was trying to recreate your error and I used a text field as an example of ETDPrev input, and my formula works just fine
  • ronaldwalcott Profile Picture
    3,827 Super User 2025 Season 2 on at
    Issue Filtering Dates Across Two Years in Power Apps
    This is incorrect if the ETDPrev value is a date DateValue(ETDPrev)
    Show examples where it is working and where it is not working
  • WarrenBelz Profile Picture
    151,866 Most Valuable Professional on at
    Issue Filtering Dates Across Two Years in Power Apps
    I posted this earlier, but it seems to have disappeared - what is your data source type and how many records do your have ?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard