cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filter data table by date picker

New to power apps, and can't see why the date picker is not filtering the data table.

 

Trying to filter the Checkin Date and I think its related to the format of the dates, but can't figure out which format needs changing.

This is the current formula giving an invalid argument error:

 

Filter(DataTable3, Text(DateTimeValue('Checkin Date_Column2'),DateTimeFormat.LongDate) = DatePicker1.SelectedDate)

 
 
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Frequent Visitor

Re: Filter data table by date picker

Thanks that's a start getting the formula in the right place 😀

Still getting an invalid argument though on the DataTable.

View solution in original post

Highlighted
Super User
Super User

Re: Filter data table by date picker

Use the column names in your table:

Filter(DataTable3, Text('Checkin Date_Column2',LongDate) = Text(DatePicker1.SelectedDate,LongDate))

 

Use:

Filter(DataTable3, Text('Checkin Date',LongDate) = Text(DatePicker1.SelectedDate,LongDate))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Filter data table by date picker

Hi @andyv9 ,

Try

Filter(
   DataTable3, 
   DateDiff(  
      'Checkin Date_Column2',
      DatePicker1.SelectedDate,
      Days
   )=0
)

 

Please click Accept as solution 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 giving it Thumbs Up.

Highlighted
Resolver I
Resolver I

Re: Filter data table by date picker

Hi,

Use the below formula to filter data table by date picker,

Filter(DataTable3, Text(Checkin Date_Column2,DateTimeFormat.ShortDate) = Text(DatePicker1.SelectedDate,DateTimeFormat.ShortDate))

Please click Accept as Solution, if this solution solved your issue. If this post was useful, please consider giving it Thumbs Up.

 

Thanks & Regards,

Devendra Singh

Highlighted
Super User
Super User

Re: Filter data table by date picker

@andyv9 

You have put the formula at the wrong place. It should be put on the Items property of the Datatable.

 

After correction on the placement of the formula, if your formula does not work, try

Filter(DataTable3, Text('Checkin Date_Column2',LongDate) = Text(DatePicker1.SelectedDate,LongDate))

On the items of the Datatable 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 
 
 
 
Highlighted
Super User
Super User

Re: Filter data table by date picker

@andyv9 ,

@eka24 is correct - it needs to be in the Items of your gallery.

I was more concentrating on the formula (which also needs some adjustment as you are comparing text with a date).

Highlighted
Frequent Visitor

Re: Filter data table by date picker

Thanks that's a start getting the formula in the right place 😀

Still getting an invalid argument though on the DataTable.

View solution in original post

Highlighted
Super User
Super User

Re: Filter data table by date picker

Use the column names in your table:

Filter(DataTable3, Text('Checkin Date_Column2',LongDate) = Text(DatePicker1.SelectedDate,LongDate))

 

Use:

Filter(DataTable3, Text('Checkin Date',LongDate) = Text(DatePicker1.SelectedDate,LongDate))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,576)