9 Replies Latest reply on Mar 21, 2013 6:19 AM by Alex Kerin

# HELP!! Salary figures are summing oddly!

Hi -

I have data for people and salaries. Due to the way that the data needs to be formatted for Tableau, I have multiple rows of the same salary data for the same person. For example, I have ten rows for John Doe with his salary of \$50,000 for each row. When I want to look at the total salary for multiple people, it adds up all of John Doe's ten rows. I do not want it to do this - I want it to count John Doe's salary once. How do I do this?

Thank you!

Kate

• ###### 1. Re: HELP!! Salary figures are summing oddly!

This is one way to do that - use a table calc to find the single value per person, then sum these. Do you have to have the multiple rows of could you bring the data in differently?

• ###### 2. Re: HELP!! Salary figures are summing oddly!

Hi again,

I have to have multiple rows for each person because I have different percents for different activities for each employee.

Kate

• ###### 3. Re: HELP!! Salary figures are summing oddly!

I tried using a similar formula but it did not work.

Kate

• ###### 4. Re: HELP!! Salary figures are summing oddly!

Try changing aggregation from SUM to AVG. Average of 10 rows of \$50,000 is \$50,000. This is a hack, of course, but it might do the trick.

• ###### 5. Re: HELP!! Salary figures are summing oddly!

Did you see the window_min calculation?

• ###### 6. Re: HELP!! Salary figures are summing oddly!

Hi -

No, what is the window_min calcuation? I tried it, but my data returns zeros.

Kate

• ###### 7. Re: HELP!! Salary figures are summing oddly!

I don't understand what you mean - you did try copying the window_min calculation?

• ###### 8. Re: HELP!! Salary figures are summing oddly!

Yes - the calculation you provided as a window_sum. What is the difference? Thank yoU!

Kate

• ###### 9. Re: HELP!! Salary figures are summing oddly!

Sorry, apologies - I meant the window_sum calc - the important thing to note is the partitioning of the calculation - if you see on sheet 4, right click Sum Sal, and look at the compute using - it's set to Person. Now depending what you have on your view, that may need to change. If you can post a tbwx (with sensitive data removed) I can show you what you need to do.