cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,521)