- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 26, 2024 07:43 AM
I am looking for the Airtable equivalent of a HAVING clause in SQL.
I have a view with the following fields (columns):
- Name
- Timestamp
- PointsDelta
Now I want to add another field named PointsTotal which should be automatically computed as the sum of the PointsDelta of all records in that same table having a Timestamp <= the Timestamp of the current row.
I tried to do this with rollup but there is no way to enter that condition. How can I accomplish it?
Example data:
Name | Timestamp | PointsDelta | PointsTotal
------+--------------+-------------+------------
foo | 24/8/24 7:15 | 5 | 5
bar | 24/8/24 8:21 | -3 | 2
baz | 24/8/24 9:07 | 10 | 12
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 26, 2024 08:57 AM
Hello,
You could do that with a script and an automation, question being how you want to trigger this automation.
Here is what I tested:
Field "Test" here is just used to trigger the automation:
Script being (you will need to modifiy the table's name on first line, called "Items" in my example):
