Cross table - math functions

Use Case: I am trying to calculate the Cost Per Lead for multiple businesses that use my app

I have the sum of $ paid by CompanyID for marketing in one pivot table as a data source

I have the sum of # of leads generated by companyID in another data source within glide

Question how could I perform cross-data source math calculations on the glide side? Is this possible?

Thank you!

Holy FUCJCJKSKSK GPT 4 for the win!!

=ARRAYFORMULA(
{
{“Comp_id”, “SUM of Clicki Balance”, “Cost Per Lead”};
‘Pivot Table 2’!A2:B,
IFERROR(
‘Pivot Table 2’!B2:B /
VLOOKUP(‘Pivot Table 2’!A2:A, ‘ReferralSummaryPivot’!A2:B, 2, FALSE)
)
}
)

That’s a sheet formula. I imagine you could do the same thing in Glide with a relation and rollup, with a math column to handle any other math you need.

1 Like

Ya ended up doing it on google sheet side. Seemed to be the quickest path. Glide was not working for some reason - likely user knowledge error LOL