Benoit, sorry to intrude but I have a similar problem too.
My excel sheet is of the form:
EMPLOYEE_NUMBER, ELEMENT_NAME, PAY_VALUE, ELEMENT CLASSIFICATION
ELEMENT_CLASSIFICATION can be Earnings or Deductions
So you can have for example:
SM983, Basic Salary, 500, Earnings
SM983, Tax, 20, Deductions
And this repeats for a number of employees.
I have added employee number in the row, and element row in column. I have then dropped pay value as the value for the ELEMENT_NAME.
So my spreadsheet becomes:
REPORTING_NAME
EMPLOYEE_NUMBER BASIC_SALARY CAR_ALLOWANCE TAX TOT_EA TOT_DED
------------------------------------------------------------------------------------------------------------------------------------------------------------
SM983 500 40 29 540 29
What I want to do is to have two calculations called Total Earnings and Total Deductions. I tried this calculation:
SUM(IF ELEMENT_CLASSIFICATION="Earnings" THEN RESULT_VALUE)
But when I try to drop it after REPORTING_NAME or EMPLOYEE_NAME it shows up with a weird figure I know nothing about. I have tried converting my calculation to a dimension by casting it as STR() but this doesn't seem to work either. Is there any way to have calculations on rows.
Also I used oracle discoverer previously and you have commands like SUM RESULT_VALUE over ELEMENT_CLASSIFICATION e.t.c but the tableau calculations seem very basic to me. Any guys can help?
I found the solution:
Create a calculation with the value:
TOTAL( SUM(IF CLASSIFICATION_NAME = "Voluntary Deductions" THEN RESULT_VALUE END) )
Then add this calculation as a row in the worksheet and set it as discrete.