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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,304)