cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filter Gallery By Date

My filter will not work properly, any Ideas?

Filter('[dbo].[Batch_Data]', Text(Batch_Schedul_Date, "mm/dd/yyyy") = Text(greenDate.SelectedDate, "mm/dd/yyyy"))

I recently switched from reading from a OneDrive File to an actual DB Table and the only thing I changed was the source.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Filter Gallery By Date

Hello @RezaDorrani Thank you for the quick reply.  I found the error in my way.  I was trying to filter on the default property not the items property.  Once I read the error about expecting a record but received a table I knew something else was wrong.

 

I appreciate the quick response.

 

Thank you

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Filter Gallery By Date

Hi @Anonymous 

 

Direct date filters do not work for SQL Server. However, you can create a calculated column that will work. For instance, ALTER TABLE myTable ADD DateAsInt AS (YEAR([date]) * 10000 + MONTH([date]) * 100 + DAY([date])) and then filter on the calculated number column.

https://docs.microsoft.com/en-us/connectors/sql/

 

I did a video on date column filter with sharepoint

https://www.youtube.com/watch?v=eCMuXPI1Qok

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Anonymous
Not applicable

Re: Filter Gallery By Date

Hello @RezaDorrani Thank you for the quick reply.  I found the error in my way.  I was trying to filter on the default property not the items property.  Once I read the error about expecting a record but received a table I knew something else was wrong.

 

I appreciate the quick response.

 

Thank you

View solution in original post

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,458)