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 / Issue Filtering Dates ...
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! 😊

etd.png
Categories:
  • AndrianaO Profile Picture
    242 Moderator on at
    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,914 Moderator on at
    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
    156,926 Most Valuable Professional on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard