8 Replies Latest reply on Sep 4, 2013 9:15 AM by Peg Flick

# Percent in Table from a Count

I have created a table in Tableau with two dimensions: Year and Level of Performance (1, 2, 3, or 4).  The Year is in rows and Level in columns.  Right now the measure is a count, but I want it to display a percent for the Year of each Performance Level.  Is this easy or do I have to create custom calculations?

• ###### 1. Re: Percent in Table from a Count

Hi Joseph, welcome to the forums! Yes this is easy to do. It sounds like your looking for a quick table calculations. But first please read this, and then post a packaged workbook. Thanks,

--Shawn

• ###### 2. Re: Percent in Table from a Count

Joseph,

It's hard to tell what your data looks like.  If you can post a packaged workbook, that'd help us give a specific answer.

And welcome to the forums!

Joshua

• ###### 3. Re: Percent in Table from a Count

Thanks for the responses.  I uploaded a packaged workbook.  I hope this helps.

Joe

• ###### 4. Re: Percent in Table from a Count

You go Joshua. I'm on other issues. Thanks for posting a packaged workbook Joseph. If Joshua doesn't have time ping me on Monday and I'll take a look.

--Shawn

• ###### 5. Re: Percent in Table from a Count

Joseph,

I think what you need to do in this case is to add a table calculation.  Fortunately, Tableau makes it very easy to add standard table calculations to measures without any coding.

Just right click the measure (or use the drop down on the field) , select "Quick Table Calculation" and select the calc you want.  In this case it sounds like you wanted Percent of Total.  The calculation will by default be calculated Table Across which, in this case, will be the percent of total for each year.

You'll notice that the field on Text now has a triangle icon to let you know a table calc is in play.

As you want to get more complicated, you'll want to search the knowledge base on table calculations to see other examples.

• ###### 6. Re: Percent in Table from a Count

Joshua,

Thanks for your answer.  That is exactly what I was after.  I really appreciate your quick reply and support. How did you get the grand total?

Regards, Joe

• ###### 7. Re: Percent in Table from a Count

Joe,

Glad to help!  You can turn totals on and off selecting Analysis --> Totals from the menu.

• ###### 8. Re: Percent in Table from a Count

Joshua, what if you wanted the total count next to the total percent?  So the rows contain percents but then the last 2 columns contain the total percent and total count.  Just so viewers know how many people we're talking about.