9 Replies Latest reply on Jan 31, 2019 12:34 PM by Michelle Smith

# How to add a % of row for a table

Hi everyone,

I am using Tableau 2018.1 and I am trying to create a highlight table with two metrics that would show for each row (and column):

1. The total in the row (or column)

2. This total number as a % of the whole table

I managed to create 1., but struggling with 2.

In the screenshot below, I would like to show that the row Furniture, which has a total of \$742,000 represents 32% of the total sales display in the table. Ideally I would like to show that percentage number just after the total.

Same idea for the column, i.e., show that the total Central Sales of \$501,240 represent 22% of the total sales in the table.

Any help would be greatly appreciated,

Thank you!

• ###### 1. Re: How to add a % of row for a table

Added two new calculated fields, WINDOWSUM and Total %, is this what you were looking for?

1 of 1 people found this helpful
• ###### 2. Re: How to add a % of row for a table

hi Jack

is this what you want

this is the % of total in the table

this is the discrete table calc

the workbook is attached

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 3. Re: How to add a % of row for a table

Is this what you are looking for.

• ###### 4. Re: How to add a % of row for a table

Thanks this is perfect. I figured window_sum() would be helpful but I had no idea how to use it. I will study your answer in more details.

• ###### 5. Re: How to add a % of row for a table

Thanks, Jim. This is what I spent too much time trying to figure out

• ###### 6. Re: How to add a % of row for a table

Jim

• ###### 7. Re: How to add a % of row for a table

I hope it helps! I think this is a good solution if you are trying to keep the table exactly the same as your sample & add in the percent of total beside/under the total column and row. At least that's what I understood your original requirement to be. Good luck!

• ###### 8. Re: How to add a % of row for a table

Michelle, could you re-attach the tableau file? The file seems to be corrupted and why I replicate your steps on my file, it gives a different result. So I would like to play with your workbook. Thanks!

• ###### 9. Re: How to add a % of row for a table

Unfortunately I have version 2018.3 but I exported as 10.2. I hope this one works for you.