Hi,
I've got a data set that includes data for two different locations ("location" field, string) and I'm trying to create a data expression that returns the number of people ("people" field, integer) at each location based on the most recent record ("data_date" field, date) for each location.
I've looked at the GitHub examples for GroupBy and MostRecentRecord and I think I need to kind of combine these but haven't had any luck so far.
Data:
| data_date | location | people |
| 10/5/2021 16:00 | location_1 | 10 |
| 10/5/2021 16:00 | location_2 | 13 |
| 9/22/2021 16:00 | location_1 | 5 |
| 9/24/2021 16:00 | location_2 | 4 |
What I want returned:
| data_date | location | people |
| 10/5/2021 16:00 | location_1 | 10 |
| 10/5/2021 16:00 | location_2 | 13 |
Any help would be appreciated! Thanks!
Molly (she/hers)