Raghav- There are two ways I could come up with,
1) Just pivot your data and get what you need using, "Column Totals" and "Quick Table Calcs"
2) Manually create a "Total" calc, and then also create "% of Total" calcs for individual rows which isn't very intuitive when you have more rows.
Attached both workbooks.
Hope this helps.
Can you please let me know how have you done Pivot in Tableau?
Steps involved in it.
1) Go to Data Source pane,
2) Select the columns you want to pivot, in this case all and click on the arrow to see the drop down menu, click on Pivot
3) Tableau creates 2 new columns, Pivot field names and Pivot field values. The original columns are now nullified. So you can delete those,
4) Now on your worksheet,
Hope this helps. More on this topic here. Pivot Data from Columns to Rows