Hello all,
i have a problem which i cannot solve. It´s a mistery to me.
I have a table where i want to sum up the weight if a second field has a special number in it.
The follwing should sum up every field where the category transporcat is 1,2 or 3. The categoryfield is defined as string but in the case here there are only numbers in it. In this case the transportcat 1 exists one time, 2 exists one time, 3 does not exist. The weight vor cat 1 and 2 is identical with 5. So there are no differences between the data exept the transportcat.
= SUM(IIF(Fields.transportcat=3,Fields.weight,'' )) or = SUM(IIF(Fields.transportcat="3",Fields.weight,'' )) -> Result: '' which is correct
= SUM(IIF(Fields.transportcat=2,Fields.weight,'' )) or = SUM(IIF(Fields.transportcat="2",Fields.weight,'' )) -> Error - Should be '5'
Error: the input format has the wrong format?
= SUM(IIF(Fields.transportcat=1,Fields.weight,'' )) or = SUM(IIF(Fields.transportcat="1",Fields.weight,'' )) -> Result: '5' which is correct
The test data for the IIF comparison is identical except that the value of the transportcat field is different. I can also use other (4,5,6) and it is still working. Only when i use the number 2 it doesn´t ?
Regards Alex