cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eenochs
Level: Powered On

Filter Date Range

I have a SharePoint list that i'm using to track support tickets.  I want to create a gallery that will show the last 30 days of items submitted using a specific incident type. 

 

Example would be you click from a drop down a specific icident type called Printers.  Then the gallery will show any items submitted to the list with that incident type.  Having challenges coming up with the filter formula. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Date Range

Agreed with @sudeep22169 here.

The formula should be written as:

 

Filter(TicketList, Type=Dropdown.Selected.value && CreatedDate>=DateAdd(Today(),-30,Days))

More information, see:

Filter function

DateAdd function

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
sudeep22169
Level: Powered On

Re: Filter Date Range

Filter(datasource, items = dropdown.selected.value && date = Today()-30 )

This might help you.

Community Support Team
Community Support Team

Re: Filter Date Range

Agreed with @sudeep22169 here.

The formula should be written as:

 

Filter(TicketList, Type=Dropdown.Selected.value && CreatedDate>=DateAdd(Today(),-30,Days))

More information, see:

Filter function

DateAdd function

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
llacefield
Level: Powered On

Re: Filter Date Range

@v-micsh-msft 

What would be the best approach to avoid the "Delegation Warning" you would receive with this line of code?

PowerAnalytics
Level: Powered On

Re: Filter Date Range

To avoid the "Delegation Warning" you can use use the FirstN() when you collecting your items.

 

For example:

 

ClearCollect(collectionName,FirstN(data source;500);
Filter(collectionName, SharePointColumn >= DatePicker1.SelectedDate && SharePointColumn <= DatePicker2.SelectedDate)

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-first-last 

 

I hope this will help you.

 

Best regards,

 

PA

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 210 members 3,552 guests
Recent signins:
Please welcome our newest community members: