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

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
Community Support Team
Community Support Team

Re: Formula Help: Max of Before the filter date

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
Level: Powered On

Re: Formula Help: Max of Before the filter date

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.

Community Support Team
Community Support Team

Re: Formula Help: Max of Before the filter date

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Users online (3,579)