4 Replies Latest reply on Nov 15, 2016 8:49 AM by Tableau User Branched to a new discussion.

How to add a 'Percentage of' to only one column in a table

I have a table with 8 columns, The 1 st column shows a demension, the other 7 columns show various measures.

I need to add a column that would show a 'percentage of Totals' fro each row of the second column:

(number of records per Code/Total records in the column) * 100

When I use Analysis/Percentage of menu, the percentage is applied to all the columns in the table.

Is there a way to create a calculated field to calculate the percentage?

I don't know how to reference a column's Grand total in a formula - Total records in the column

I attached a png file of my table

Thanks

• 1. Re: How to add a 'Percentage of' to only one column in a table

You can't mix a total with row-level data like that in a calculated field, but you can do so in what's called a "table calculation".  Right-click on the SUM(Number of records) pill and select Quick Table Calculation -> Percent of Total.  (Then add SUM(Number of records) to the Measure Values shelf again so you have both the raw numbers and the percentages.)  That work?

1 of 1 people found this helpful
• 2. Re: How to add a 'Percentage of' to only one column in a table

Yes. it worked, thank you.

1 of 1 people found this helpful
• 3. Re: How to add a 'Percentage of' to only one column in a table

James,

My question is similar to the original with one exception. I have dimension columns (region) & rows (Additive) of two different values. The sales volume is summed by these dimensions. I have the grand totals for the rows & columns displayed but I only want one column with the grand total  percent. When I follow your instructions above it not only gives me the grand total percentage but each individual region/additive has a percent of it's total as well. If I hide/exclude the regional/additive percent column, it hides all the percents including the grand total percent. How do I "hide" the region/product percent without removing the grand total percent? I've attached a picture of what I am talking about

1 of 1 people found this helpful
• 4. Re: How to add a 'Percentage of' to only one column in a table

did you find a solution to this question?

1 of 1 people found this helpful