cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SDH_84
Helper I
Helper I

Formula to Return a value in 'Days Since ticket created' from item created

Hello,

 

I have built a Ticketing Helpdesk app, and I would like to display a value to show the user how many of the tickets are over three days old. 

 

The data is stored in a SharePoint list with a 'Date Created' column. I need to show the number of items over 3 days old. Can anyone help? 

 

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi, @SDH_84,

 

My mistake, I swapped the arguments of the DateDiff() function. Should be like this:

 

CountRows(
	Filter(
		Tickets, 
		DateDiff('Date Created', Now()) > 3
	)
)

View solution in original post

4 REPLIES 4
BCBuizer
Super User
Super User

Hi,

 

To get that number you can use this code:

 

CountRows(
	Filter(
		Tickets, 
		DateDiff(Now(), 'Date Created') > 3
	)
)

 

Of course the name of the data source may need to be changed from 'Tickets' to whatever the actual name is.

Thanks BCBuizer, I'm now getting value at least, for some reason this is returning a value of '0' although there are open tickets over this date range. Any idea why this could be? Does the date column in SP have to be a certain format? Screen grab below. 

 

Thanks for your help

 

SDH_84_0-1650896855185.png

 

BCBuizer
Super User
Super User

Hi, @SDH_84,

 

My mistake, I swapped the arguments of the DateDiff() function. Should be like this:

 

CountRows(
	Filter(
		Tickets, 
		DateDiff('Date Created', Now()) > 3
	)
)
SDH_84
Helper I
Helper I

@BCBuizer Thank you so much! 

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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
Top Kudoed Authors
Users online (2,578)