create row sum and column sum
source: weekly challenge 324
row and column total at once
- transpose the data (row identifier is need)
- then reshape back the original table using crosstab with aggregation method, total row and total column
- use dynamic rename to remove the prefix of the column name, which is the aggregation method (eg Sum_colname)
row with subtotal
- classify the row
- use summerize to sum of row, group by classification
- union to original table