Help with creating a formula in a Group By View


I’m hoping I can get some help around using the Group By functionality. My base has a few number fields and a calculated field (using a formula). For simplicity, let’s say I have fields Name, A, B, C, and D. The formula for D = (A+2B) / C.

When I group by Name, I can get the Sum_A, Sum_B, and Sum_C numbers at the top in the Group by section. I want to use those numbers to calculate the Group by number for field D but I am only offered the standard math function choices (sum, average, min, max, etc.). Is there a way for me to do this? Can I create a function that I can make appear as a choice for field D?

I could easily do this in a SQL query but I’m at a loss for how to do it in Airtable (I’ve looked around at the vids and this forum). I did create a workaround using rollup but it is very cumbersome and prone to human error.