Pivot table can sum up the values of columns when it is created. To calculate the values of rows, you can use the calculated fields manually.