Welcome to the Airtable Community!
In short, yes it is possible to accomplish what you would like, but you will likely need to change the structure of you base slightly to accomplish it.
This kind of calculation is possible if you have your "parameter" be a linked field to a table contains your various parameters. In the case of my mock set up below, Group 1 and Group 2 are individual parameter records on a new table. With a linked field/table you are able to leverage roll ups fields to calculate the sums that you see at the top of your grouping, and then look them up again on your original table. With these look up fields you can set up a difference of the two sums in a formula field and use that field in a conditional automation trigger.
Original Table:
These roll-up fields need to be set up on the Parameters Table. Below is my parameters table and an example of the roll up calculation.
Parameter Table:
Roll-up field example:
To set up the automation it would look something like the image below where you can set you limit for triggering the action.
Note: depending on the information you need for your automation's action you maybe also be able to set this trigger up from the Parameter table instead. Meaning you wouldn't need the lookups or difference of sum on the Original Table.
I hope this helps!