cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Post Partisan
Post Partisan

Canvas App- Date Filter

Trying to display the reports based on the date filter.

 

Current Setup :

  1. DataTable
  2. DatePicker1
  3. DatePicker2

AVTS_0-1620387485653.png

Datasource is selected in Datatable Items : Dailyinventory.

 

How to display the filter based table results in the Datatable

 

 

 

22 REPLIES 22

it did not pick through error ,

 

AVTS_0-1620412784567.png

 

zaphod88
Responsive Resident
Responsive Resident

Missed a bracket, sorry:
If(DatePicker2.SelectedDate = DatePicker3.SelectedDate,

  Filter(Dailyinventory, 'Created On' = DatePicker2.SelectedDate),
  
Filter(Dailyinventory, 'Created On' >= DatePicker2.SelectedDate && 'Created On' <= DatePicker3.SelectedDate )) 

thanks now error disappear but results are same i have to select the 03.05.2021 to display the 02.05.2021 records.

AVTS
Post Partisan
Post Partisan

Hello Friends,

 

What wrong in this code ? i see most of the users are referring the same whereas its not picking as per given date. instead i have to give additional one more day to get previous day data...

Filter('Dailyinventory', 'Created On' >= (DatePicker2.SelectedDate) && ('Created On') <= (DatePicker3.SelectedDate))

 

Need your view on this ..

Show sample data. Indicate the result you expect and the result you are actually getting.

That would help deal with it. 

 

This is the first code i gave which is same as you are quoting:

Filter (Dailyinventory, DateColumn >= StartDate.SelectedDate && DateColumn <= EndDate.SelectedDate)

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

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.

AVTS
Post Partisan
Post Partisan

Find follows,

 

Trying to see the records betwen 02/05/2021

AVTS_0-1620418591441.png

 

 

Below is the result with future date ..

 

AVTS_1-1620419072412.png

 

 

zaphod88
Responsive Resident
Responsive Resident

Maybe the time zones of PowerApps and your data source (Sharepoint?) are different?

Datasource is Dataverse table shows correct date.

 

AVTS_0-1620419759950.png

 

zaphod88
Responsive Resident
Responsive Resident

Hm... I have no clue what the problem is here. Maybe @RandyHayes can help?

zaphod88
Responsive Resident
Responsive Resident

Ok, I found it. Although not shown in DatePicker, there seems to be a time included, I guess at midnight. So you have to change it to:

 

Filter (Dailyinventory, DateColumn >= StartDate.SelectedDate && DateColumn <= DateAdd(DateAdd(EndDate.SelectedDate,1,Days),-1,Milliseconds))



Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,384)