Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field that is calculated in the script and it is returning the correct result. It is called TotalPay
However, when I Sum(TotalPay) I get a much larger result. Also, if I calculate TotalPay manually in the chart I get the same larger result.
This would make me believe that I have multiple rows that I am not seeing in the chart because the data is identical. But the Sum is adding them all up.
How can I go about confirming this or determining what is wrong?
I have attached a screen shot of the data. As you can see there is only 1 row displayed.
You can add RowNo() as Key to your table and then add Key to your table to see the unique id
Are there joins taking place which are essentially multiplying the data? Right now, it seems that there are 4 rows which are getting added to give you 699.52 when you do Sum([Total Pay])
I inherited this code.
It is using 2 Mapping Loads and then taking the fields from this to calculate the Total Pay field.
map_PayRate: Mapping Load TimeCodeID, [Pay Rate] Resident TimeType;
map_HourlyWage: Mapping Load Employee_ID, [Hourly Wage] Resident [FinalEmployee]
ApplyMap('map_hourlyWage',EmpID) * TimeWorked * ApplyMap('map_PayRate',"TimeCode") as [Total Pay]
This all looks normal to me.
Are there more then one EmpID in your table? Try this
Dimension
EmpID
Expression
Count(EmpID)
Did that with this filter active and the count is only 1.
I just did a Sum of each part that makes up the expression. The [Job Hours Worked] sums to 32 instead of 8. The hourly wage is fine.
This is getting more confusing by the second. Logically this tells me that I have 4 rows. But I don't see them.
You can add RowNo() as Key to your table and then add Key to your table to see the unique id
That worked. Now I see 4 rows in my table. Now I need to figure out why. Thank you.
Awesome