I need to compare Todays() date - [Date], to the lastest (last date I have in list). In other words, I don't need to compare Today() - 1. It might be Today()-2, or Today()-3, etc... How do I write the expression to look for the latest date in my list and compare that date to Today()?
Here is what I currently have:
SUM(SELECT(Historical Totals Table[Totals],
AND(
[Location] = [_THISROW].[Location],
[Category] = [_THISROW].[Category],
[Date] = TODAY() - 1)
)
)
Maybe with MAX() ?
for the latest, you could use the MAXROW() expression nested inside of a LOOKUP() expression
https://support.google.com/appsheet/answer/10107920?hl=en
https://support.google.com/appsheet/answer/10107410?hl=en
for example, i use this:
lookup(MAXROW("admissions","Timestamp",([_patientIdentifier]=[_THISROW].[_patientIdentifier])),"admissions","_encounterID","Admission Date")
to pull the most recent Admission record based on the timestamp the record was entered.
in this case "admissions" is a table, and Timestamp, _encounterID, and Admission Date are all values from that table
_patientIdentifer is a ref to the Patients table, which is looking up this information.
Thanks. Ill try this.
User | Count |
---|---|
18 | |
9 | |
8 | |
5 | |
5 |