I'm trying to SUM values using an IF statement.
I have a table that shows employee's time and hours for 3 different
shifts.
The results are grouped so each day I can see the employee total hrs
and also another group that shows the grouped results for a range of
dates.
At the table footer, i'm trying to show the Total Sum of all employees.
Here is my SUM statement
=Sum(IIF(Fields!SHIFT.Value <200, Fields!HOURS.Value,0))
I get an error saying
The value expression for the textbox 'textbox45' uses an aggregate
function on data of varying data types. Aggregate functions other than
First, Last, Previous, Count, and CountDistinct can only aggregate data
of a single data type.
Kevin - 30 Nov 2006 19:43 GMT
Do some of the values contain decimals and some not? That might be the
issue. If that's the case, consider casting the values to decimal or
double first. There has to be a function to do that in the conversions
sections of the expression builder.
-Kevin
> I'm trying to SUM values using an IF statement.
>
[quoted text clipped - 14 lines]
> First, Last, Previous, Count, and CountDistinct can only aggregate data
> of a single data type.