IvanWeiss
3 years agoQrew Captain
Calculating the average salary for employees of the same title
Hi everyone,
I have two tables in a HR app, one called Team Members and the other Compensation.
In Team Members I have the Team Member name and their Title
In Compensation I have a record for each salary so I can keep track of their history.
In Team Members I am summarizing the maximum salary to get the employees current salary.
In Compensation I am looking up the name and title of the Team Member
What I want to do is calculate the average salary per title. I am fairly certain I need to do a formula query to do this but I am trying to dynamically determine how many records and calculate it.
The logic around this in english is:
Get the records of all of the team members with the same title
Sum all of their current salaries
Divide that by the number of records
That should return the average salary.
Can anyone help me get started on how I would go about doing that?
------------------------------
Ivan Weiss
------------------------------
I have two tables in a HR app, one called Team Members and the other Compensation.
In Team Members I have the Team Member name and their Title
In Compensation I have a record for each salary so I can keep track of their history.
In Team Members I am summarizing the maximum salary to get the employees current salary.
In Compensation I am looking up the name and title of the Team Member
What I want to do is calculate the average salary per title. I am fairly certain I need to do a formula query to do this but I am trying to dynamically determine how many records and calculate it.
The logic around this in english is:
Get the records of all of the team members with the same title
Sum all of their current salaries
Divide that by the number of records
That should return the average salary.
Can anyone help me get started on how I would go about doing that?
------------------------------
Ivan Weiss
------------------------------