Oct 04, 2023 01:44 AM
I've set up an interface dashboard that pulls in data from two different tables. Within this dashboard are two number elements that are Field summery Sums of data from the two tables.
In a third Number element I wanted to use a formula to divide one by the other, I thought I could use a very simple formula for this in the element itself, but I cant.
Is it possible to do what I need in the interface dashboard?
Solved! Go to Solution.
Oct 04, 2023 01:20 PM
Hi @sehenley,
I regret to inform you that it is currently not possible to create a formula directly within the interface that utilizes aggregations from two different tables for calculations. However, in my previous projects, I addressed this limitation by employing a script to incorporate the aggregated values into two separate rows within a custom "Aggregation" table. This approach not only allows for the calculation to be performed directly through the Airtable script but also provides the flexibility to execute highly intricate calculations, leveraging the power of JavaScript.
I hope this helps!
Website: https://alessiomonino.com
Calendly: https://alessiomonino.com/contact
Email: alessio.monino@gmail.com
Oct 04, 2023 01:20 PM
Hi @sehenley,
I regret to inform you that it is currently not possible to create a formula directly within the interface that utilizes aggregations from two different tables for calculations. However, in my previous projects, I addressed this limitation by employing a script to incorporate the aggregated values into two separate rows within a custom "Aggregation" table. This approach not only allows for the calculation to be performed directly through the Airtable script but also provides the flexibility to execute highly intricate calculations, leveraging the power of JavaScript.
I hope this helps!
Website: https://alessiomonino.com
Calendly: https://alessiomonino.com/contact
Email: alessio.monino@gmail.com
Oct 04, 2023 06:12 PM
simply write the formula in the airtable base and reference it with the number field. If you want to add dynamic conditions to it, you can do so within the number in interfaces. So for example, you have a "Show Expenses" checkbox. Add two conditions to the number in the interface: When "Show Expenses" = checked+conditions, OR "Show Expenses" = not checked+conditions
Oct 05, 2023 12:54 AM
Thanks that's really usefull, I actually used a roll up field to do calcuations in the base and reference that in the dashboard