cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AislingFaulkner
Helper III
Helper III

Calculate total over a period of time

Hey guys,

 

I have recently been tasked with building an app that seemed simple at first but when I got down to it I came up blank.

 

I have an SP list that has employee #, various transaction amounts, and the date the transaction took place. What I need the app to do is search and employee #, and return the total amount spent in any given month.

 

Any suggestions welcome, as I am drawing a blank here!

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

The following formula works in an expense account app I built.

Sum(Filter(Filter('Expense Reports', Employee.Email = currentuser ),ExpDate > DatePicker1.SelectedDate && ExpDate< DatePicker2.SelectedDate),Amount)

"Expense Reports" is the SharePoint list

Employee is a People/Group column

ExpDate is the Date the expense was incurred.

Note: Since the Date portion of the filter isn't delegable you need to be sure that there are less than 500-2000 items for a particular employee.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks for that, I've modified it to this:

 

Sum(Filter(Filter('All Fuel Query Data', 'Drivers Amount' = Dropdown2.Selected.Result ),Date > DatePicker2.SelectedDate && Date< DatePicker3.SelectedDate),Total)

 

With Dropdown2 holding the employee number, and Drivers Amount being the gallery field it is being fed into/ This is giving me an invalid argument type error, though I am not sure why

Disregard that, got it working, but unfortunately I can not delete reply 

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,667)