Sum() is one of Tableau's built-in aggregation functions, so there is no need to write a calculated field if that's all you're doing. Just drag the [Amount] field on to (say) the text shelf and select Sum() as the aggregation. Then put [Customer] on the row shelf.
Sum() is efficient, and performed on the database server only sending back the results to the client. So if you are summing a million rows, only the answer needs to be sent over the wire. Of course, if you are grouping by a dimension so that half your dimension members have only one row, you'll still be sending back lots of data.
If your calculation is more complicated, emh is correct about where to start making calculated fields.