i have table with date and value. i want latest date’s value.
Where do you want it? If it’s in a formula, this should give you the expected result:
MY_TABLE.lookupRecords(sort_by="date").value[-1]
1 Like
I suggest this (this could go in a summary table for example):
MY_TABLE.lookupOne(sort_by="-date").value
lookupOne
returns the first matching record, and sort_by="-date"
ensures that the records are sorted by descending date, so that the first one is for the latest date.
(This assumes that date
is the name of the date column and value
is the name of the value column, and MY_TABLE
is the name of the table.)
2 Likes