This will be very useful, but I think the ideal would be to have that functionality when connecting/binding a text box to the dataset numeric field - right on the page.
So when you you select [Text connects to] and you pick a number field, further options should be made available with math functions e.g. sum, min, max , avg etc
This will be useful when creating a report like order totals etc.
to expand on this idea.
The same could be done for other types of fields like date and time
Also referring to Andreas’s other idea of adding formulas in the collection field during collection design. How about having that capability on the page itself. e.g. bind the text box to the dataset and use a formula/function to calculate a value (in stead of doing that with a script) just by entering e.g. =sum(“fieldname”) or =“fieldname”*(“fieldname”+“fieldname”)