Questions on transposing tables

Sorry for a silly question. I know how to compute sums in new columns. How do we compute sums in new rows? Just to total rows.