1 2 Previous Next 15 Replies Latest reply on Mar 7, 2016 6:22 AM by Shinichiro Murakami

how to create a correlation chart between noise level and % of people annoyed

In the dummy csv file there are three columns of data: user ID, noise level, and if the user feel annoyed by the noise level (y: feeling annoyed, n: not feeling annoyed).

I want to create a chart like the following that shows the correlation between the noise level (x axis) and the corresponding percentage of people feeling annoyed at that noise level (y axis).

May I ask how to create this correlation chart in Tableau?

I know how to create cumulative frequency distribution chart for a given continuous numerical variable (e.g. noise level, see image below), but I cannot figure out how this type of bi-variant correlation chart can be created. I assume some kind of calculated field needs to be created that calculates the percentage of people voted annoyed for a given noise level ...

• 1. Re: how to create a correlation chart between noise level and % of people annoyed

I think attached graph has different data set.like attached.

Then ,calculate y % at each noise level and plot as scatter chart.

Then add trend line (in this case use below type)

Thanks,

Shin

9.0 attached

2 of 2 people found this helpful
• 2. Re: how to create a correlation chart between noise level and % of people annoyed

OK, i manage to do it in Excel:

1. sort the data by "noise level"

2. for each row, count the number of rows up to the current row

3. for each row, count the number of rows in which the value of the "annoyed" variable is "y"

4. create a new variable "% annoyed" for each row by dividing the value obtained in step 3 by the value obtained in step 2.

However, I still don't know how to translate the Excel method into Tableau method, probably using calculated field....

Thank you very much in advance!

• 3. Re: how to create a correlation chart between noise level and % of people annoyed

Dear Murakami San,

However, I can't open your tableau file as I'm using Tableau Public.

Is there other way that I can access the Tableau file you shared?

Thanks, again!

• 4. Re: how to create a correlation chart between noise level and % of people annoyed

Hi joe smith,

Tableau Reader is a free application that lets anyone view and interact with Tableau packaged workbooks. These packaged workbooks are created using Tableau Desktop, and are self-contained documents that combine the data and the Tableau visual analysis into a single file.

Tableau Reader makes it possible to share your visualizations and dashboards with anyone – without the need for them to have a Tableau Desktop license. With Reader, people can be viewing, filtering, printing and understanding your visualizations and dashboards in minutes.

What files can Tableau Reader open?

Tableau Reader opens packaged workbooks. These are special files that are created by the Tableau Desktop products (Tableau Professional and Tableau Personal). The packaged workbook combines the data file along with the Tableau visualizations into a single file which can be distributed to anyone with any of the Tableau products, including Reader.

So how do I get started?

It's easy.

1. Using Tableau Desktop (if needed, get a free trial and install), you create a Tableau workbook containing all the visualizations and dashboards you want to share. The more quick filters, sheet links, sliders, page shelves, and other interactive elements you include, the more your intended audience will be able to interact with your workbook.
2. You export your Tableau workbook as a "Tableau packaged workbook". Tableau creates a special file type with the file extension ".twbx". This file contains all your relevant data to support your visualizations and dashboards.
4. Your audience installs Tableau Reader. It takes just a few minutes. They use Reader to open the packaged workbook you sent them and they're seeing and interacting with visualizations and dashboards you created.

.

2 of 2 people found this helpful
• 5. Re: how to create a correlation chart between noise level and % of people annoyed

Dear Murakami San,

However, I can only see the chart you created, and I still don't know how the variable "Y %" is created.

Based on Sheet 1 in your file, I assume you convert the measure "noise level" into a dimension variable, but I can't figure out the rest steps to create the calculated field "Y %"...

Thank you very much!

• 6. Re: how to create a correlation chart between noise level and % of people annoyed

I used dummy data, which has multiple line items for respective noise point.

You can refer excel file data as attached.

I guess this is a data format which is used to create the chart you attached as picture.

y% is calculated as

count(if [Annoyed]="y" then [ID] end)/sum([Number of Records])

Hope this helps.

Thanks,

Shin

2 of 2 people found this helpful
• 7. Re: how to create a correlation chart between noise level and % of people annoyed

Dear Shin, Thank you very much!

However, using the excel data and the formula you provided, I am still unable to get the chart you created.

Can you kindly advise if I missed anything critical here?

Thank you!

• 8. Re: how to create a correlation chart between noise level and % of people annoyed

Dear Shin,

Appreciate greatly that you can kindly advise!

Thank you very much!

• 9. Re: how to create a correlation chart between noise level and % of people annoyed

Below check differentiates the view.

Thanks,

Shin

Thanks,

Shin

1 of 1 people found this helpful
• 10. Re: how to create a correlation chart between noise level and % of people annoyed

thanks, Shin!

However, when I tick "Aggregate Measures" as you suggested, I got the following chart in which all data aggregate to just one point.

Am I missing important steps here?

• 11. Re: how to create a correlation chart between noise level and % of people annoyed

... also, I created the chart in Excel using the same data in your Tableau file, and the chart I got is quite different from yours. I'm not sure if I explained what I want to plot clearly.

Anyway, the Excel file attached here should be self-explanatory (Note that the data needs to be sorted by "noise level" first to use the formula in the Excel file in the last three columns).

Hope you can kindly advise how to use Tableau to generate the same chart!

Thank you!

• 12. Re: how to create a correlation chart between noise level and % of people annoyed

Change the "Noise Level" in columns from SUM to Dimension.

See snapshot below.

2 of 2 people found this helpful
• 13. Re: how to create a correlation chart between noise level and % of people annoyed

Mosin is right for the first question.

And excel file graph shows Cum % of "Y" across Noise level which is not a target of this time?

Thanks,

Shin

1 of 1 people found this helpful
• 14. Re: how to create a correlation chart between noise level and % of people annoyed

Thanks, Mosin!

But changing the measure "noise level" to dimension still doesn't work...