4 Replies Latest reply on Oct 5, 2016 6:36 PM by Shinichiro Murakami

# Percentage of Population

Thank you in advance to everyone who is willing to help me with this issue!

I am using Tableau 10.

I am trying to display a chart or graph that shows the percentage a certain subset of my data make up of the entire population of my data set. I currently can get it to display the percentage each category makes up inside the subset, but not on the entire data set.

For example I have [People] -> [Completed Tests]

and  [People] -> [Trait] -> [Completed Tests]

The Trait field is a binary data point. 0 represents negative and 1 represents positive for that trait. (I have 5 different traits to analyze but it should be the same for all of them)

The Completed Tests field represents the number of tests a person has completed in the program in question. There is a maximum of 100 tests but in order for our data to be meaningful we need 20 tests completed. I want to display what percentage of each trait has completed 20 tests. Then I want to compare it to the percentage of the data set that has completed 20 tests.

I can compute and display the Number of Records for the data set as a whole who have completed 20 tests and the Number of Records for people in each trait that have passed 20 tests or more, but I cannot figure out how to display the relationship between the two numbers, specifically the percentage.

If you needs numbers here is an example:

Data Set Population - 20,000

# who have passed 20 - 5,000

# who have not - 15,000

Trait Population - 4,000

# within Trait to pass 20 - 1,500

# within Trait who have not - 2,500

I want to show that the data set have an overall percentage of 25% (5000/20000) but that the trait has a percentage of 37.5% (1500/4000)

Wesley

• ###### 1. Re: Percentage of Population

Wesley,

I think it's pretty straight forward type solution, but could you attach your packaged workbook (***.twbx) just in case you have hidden problem.

Thanks,

Shin

• ###### 2. Re: Percentage of Population

Hi Shin,

I am posting in this forum using my work computer but I have the data on my personal laptop that doesn't currently have access to the internet. If its possible could you post a description of how to lay it out and if that doesn't work I will post the workbook when I get home? If its not possible I can wait until later this evening once I am able to post the workbook,

Wesley

• ###### 3. Re: Percentage of Population

I have posted my workbook. I created a second workbook since my original one has gotten so messy with different sheets. This one should be streamlined. Let me know if there is anything else you need. Thanks.

Wesley

• ###### 4. Re: Percentage of Population

I think you can calculate percentage with below formulas.

[Populatioin > 20 by Triat]

sum(if [Total Tests Completed] >=20 then [Number of Records] end)

[Populatioin by Trait]

sum([Number of Records])

[Percenrtage in Trait]

[Populatioin > 20 by Triat]/[Populatioin by Trait]

Thanks,

Shin