3 Replies Latest reply on Jun 12, 2017 5:15 PM by Raj Tha

# scatter plot - with age and salary but my data consists of duplicates

Hi All,

Thanks a lot for your time. I started learning Tableau  and still trying to understand - I have a dataset which is employee dataset which includes the columns like

EMPLID, NAME, LEVEL, AGE, SALARY - I calculated AGE in my source only so it is showing as dimension (Discrete) and salary is Continuous or measure - so I convert it into measure

I am trying to understand the scatter plot by using AGE and Salary as my two variables - but the issue is I have duplicates in my Age column and they are adding up

• ###### 1. Re: scatter plot - with age and salary but my data consists of duplicates

I am sorry if this is a basic question but I have a dataset something like below and I want to understand the scatter plot using the age and salary

with the help of the other dimension called "level"

age and the salary can be duplicate as different emps can have same age and salary - this is just a sample I am trying to understand - i am only tryin g to understand the scatter plot - any help is really appreciated - i want to see the relationship between the age and salary - is the salary up as the age for the people in each level - thanks a lot

 EMPLID LEVEL AGE SALARY 101 ASSOCIATE 18 12500 102 ASSOCIATE 18 12500 103 ASSOCIATE 19 13200 104 ASSOCIATE 19 13200 105 LEAD ASSOCIATE 25 15700 106 LEAD ASSOCIATE 25 15700 107 LEAD ASSOCIATE 26 16900 108 LEAD ASSOCIATE 27 18700 109 SENIOR ASSOCIATE 35 25600 110 SENIOR ASSOCIATE 35 25600 111 SENIOR ASSOCIATE 36 25600 112 SENIOR ASSOCIATE 37 27800 113 SENIOR ASSOCIATE 39 28700
• ###### 2. Re: scatter plot - with age and salary but my data consists of duplicates

Hi Raj,

Here it will not be a wise alternative to make scatter plot. However, what you can do is imitate the scatter plot. What I mean by imitating scatter plot is as follow:

For measure like Age where each number is more like a dimension and at the same time it is a number as well, what you have to do is called 'binning'.

Follow along to create the bins as shown:

Now since you want something like scatters plot, change the bin size to 1.

Drag the AGE(bin) newly created dimension to the column and change it to continuous and Salary to Rows. by default, the salary would be Sum change this to Average.

By default the graph is bar types, Change it to circles and adjust the size of the circles to make them look like scatter plot.

I have attached the sheet for your reference.

• ###### 3. Re: scatter plot - with age and salary but my data consists of duplicates

Thank you Abhinav Garg - I was able to understand to a great extent.

Thanks

Raj