Filter a lookup formula by checking field against a static value?

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What are the exact steps to reproduce this issue?

I’m trying to create a financial dashboard based on a database of in/out transactions. I have that table set up fine. I then set up another summary table with each month in a column and then I’m trying to build formulas that will pull information from the transaction table that occurred during that month.

The transaction table has whether a line item is a debit or a credit as one of the fields. Each row is linked to the corresponding month using a formula based on the transaction date. On the summary table , I want to show the sum for debits in one column and sum for credits in another, so then I can see a net revenue.

Problem is, I can easily create a field that calculates the sum of all transactions in the corresponding month. But I can’t filter the array of transactions from the link field to only select rows marked as debit or marked as credit. I tried using the contains formula but I get an error that it won’t work on an array. (Ironically? I could easily do this in MySQL.

I will also add that I can easily do it when adding a filter to a grid view, but that doesn’t help me here.

@frederikdc could you please help with this request?

It depends on how real-time you want to have the data, but I would handle this with automations.

  • Trigger: the automation is running daily
  • Use the summary node:
    • set a filter for the month
    • set a filter for the transaction type (debit / credit)
    • Make the sum off all the transactions
  • Update the record for the current month