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 - Microsoft Dataverse
Suggested Answer

Issues with filtering a gallery using a date picker

(0) ShareShare
ReportReport
Posted on by
Hello!
 
Right now I have four date only columns in a dataverse table, S1, S2, S3, and S4. When I created a form in my app including these date fields, only S1 appeared as a Date Only field, as the other 3 (S2, S3, and S4) included hour and minute fields. I was confused as to why, but I hid them and moved on.
 
Now, I'm trying to filter this list in a gallery using a date picker (date_picker) control and it appears that only rows in the table are filtering correctly from the S1 field. The others (the ones with the hour and minute fields included when I made the form) aren't comparing correctly when the list is being filtered. I'm a bit confused as to what's going on.
 
I verified that the columns are Date Only columns in the dataverse. I'm also able to correctly compare the date fields when applying some conditional formatting like highlighting matching dates. The issues I run into is when I'm trying to filter the table using the code below:

Filter('[SOURCE], ThisRecord.S1=date_picker.SelectedDate || ThisRecord.S2=date_picker.SelectedDate || ThisRecord.S3=date_picker.SelectedDate || ThisRecord.S4=date_picker.SelectedDate)

Interestingly, when I expand this code to convert all dates to ShortDates, it filters correctly. This code below, works:

Filter('[SOURCE]', IsBlank(date_picker) || Text(ThisRecord.S1, DateTimeFormat.ShortDate)=Text(date_picker.SelectedDate, DateTimeFormat.ShortDate) || Text(ThisRecord.S2, DateTimeFormat.ShortDate)=Text(date_picker.SelectedDate, DateTimeFormat.ShortDate) || Text(ThisRecord.S3, DateTimeFormat.ShortDate)=Text(date_picker.SelectedDate, DateTimeFormat.ShortDate) || Text(ThisRecord.S4, DateTimeFormat.ShortDate)=Text(date_picker.SelectedDate, DateTimeFormat.ShortDate))

The problem with this is that the Text Function won't delegate and I anticipate that becoming an issue down the road.

 

Are there any known issues with Date columns between the Dataverse and PowerApps? I'd love to get this to work without running into the delegation issues related to Text Functions.

 

Thank you in advance!

Screenshot 2025-1...
Screenshot 2025-1...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    152,811 Most Valuable Professional on at
    Issues with filtering a gallery using a date picker
    The answer is fairly simple - a Date Picker actually produces a date/time value of 0:00 (midnight) on the date selected. This is never going to equal a date/time field containing any other time. Conversely, when you convert them to Text with just a date, they match.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 803 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics