cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dyee4614
Helper V
Helper V

Formula Help: Max of Before the filter date

I'm using a sharepoint list so I converted all my dates to a field called datevalue which is the day in a number form. Example: Jan 01, 2019 = 20190101.  I use this number to filter my list using the following formula.

 

GroupBy(Filter(FuelingApp,DateValue>=Filtering,DateValue<=Filtering2),"Location","TheGroup")

 

This allows me to sum up the totals for everything in the period.  However, I still need to figure out the total fuel used in the period because not everything will be captured in the app.  To do this, I have a field called Odometer and I want to use the max of odometer (the last reading) and subtract that by the highest odometer reading from the period beforehand.  Here is an example:

 

Jan 28 - 10

Jan 31 - 20 

Feb 1 -  30

Feb 10 - 40

Feb 28 - 50

 

I want to build a formula that will give me 50 (feb 28 - max of odometer) -20 (Jan 31, the max before the period).  

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @dyee4614 ,

 

Glad to know your issue is solved and thanks for sharing your resolution here.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
dyee4614
Helper V
Helper V

I think I figured it out.  I created a second gallery and used the following formula"

 

GroupBy(Filter(FuelingApp,DateValue<=(Filtering-1)),"Location","TheGroup1")

 

Then the formula is Value(BigTank2.Text) - MAX(TheGroup1,BigTank)  and then all the other calculations are done in the second gallery.

Hi @dyee4614 ,

 

Glad to know your issue is solved and thanks for sharing your resolution here.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,124)