Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Help with most recent value

Hello,

I am trying to select the most recent value for gallons from the test table. I keep ending up with the max value instead of grabbing the most recent gallons value. I have tried a couple of things with the same results

 

ANY(
SELECT(
Test[Gallons],
(
[_ROWNUMBER] = MAX(
SELECT(
Test[_ROWNUMBER],
([_THISROW].[Test ID] = [Test ID])
)
)
)
)
)

 

 

 

also tried 

 

IF(MAX([Related Test][Date]) = True,MAX([Related Tests][Gallons),"")

0 2 69
2 REPLIES 2

If you've connected your tables together using references, meaning you have a test parent with a gallons child, then when you look at the test table in app sheet you'll have a reverse reference of all the gallon records.

Essentially all you need to do then is pull the last value out of that list, and that's the last record; from there you just need to extract out the actual value from that record, and you're good to go.

Here's a video from a recent live stream where I show how to do this.

https://youtu.be/sDS8l7k-2cY?t=2365

Thanks, Ill check it out

Top Labels in this Space