Can you do this in grist or Airtable?
Building join tables with calculated fields is a missing feature in all spreadsheet-like solutions as far as I know.
Also I concur with the parent that I often get frustrated by my inability to do spreadsheety things in these tools.