1

I am working on a Tableau dashboard in which I want to show an employee's salary in one sheet and the average salary of that employee's department in another sheet in the same dashboard. So it will look like below

Employee     Salary      Department       DepartmentAvgSalary
Jessica      1000        Marketing        1200
Robert       2800        IT               2460

When I select Jessica from the Employee filter, it shows me Jessica's salary along with Jessica's department average and the same goes for Robert.

I want to do an analysis and compare each individual's salary vs the whole department's average. Now I want to know if this can be achieved without using parameters. Because if I use parameters, I will have to update the parameter each time a new employee signs up (we have hundreds sign up each quarter).

If the parameter is the only option then I can use that as well. But can anyone help me achieve this?

I tried using filters but it looks like I can't avoid parameters. I still can't achieve it with the parameters so I need some help here.

Debayan
  • 572
  • 6
  • 16

1 Answers1

1

Read the documentation to learn about level of detail (LOD) calculations.

You can use a fixed LOD calc to calculate the avg(salary) per department. Think of an LOD calc as a little table out in space that is precomputed based on your data at the level of detail you specify - such as per dept. Then it is implicitly joined with your original data, so that you can see the individual value (Jessica's salary) along with the corresponding aggregate value (the avg salary for Jessica's department)

It is possible to have the list of valid values for a parameter loaded from a database table to avoid entering them by hand, but I don't see why you'd need to use a parameter in this case.

Alex Blakemore
  • 11,301
  • 2
  • 26
  • 49