I have a report which provides me with three totals.
Total 1
Total 2
Total 3
Total 1 is an easy one, it uses a count fields
Total 2 is another eays one, it is a sum of all the numbers
Total 3 is a bit harder, it is the sum of all the ticks in a yes/no box. for this I use
Now... I use these 3 totals to work out three more values,
Value 1 is Total 1/Total 2 for this I use
Value 2 is where I am stuck at. It should be Total 2/Total 3
I thought I could try this, but it didn't work
However, it doesn't seem to like my work (I get an error when trying to run the report)
Data type Mismatch in criteria expression
Any help would be so helpful.
Total 1
Total 2
Total 3
Total 1 is an easy one, it uses a count fields
Code:
=Count([FIELD 1])
Total 2 is another eays one, it is a sum of all the numbers
Code:
=Sum([FIELD 2])
Total 3 is a bit harder, it is the sum of all the ticks in a yes/no box. for this I use
Code:
=Sum(IIf([FIELD 3]=True,1,0))
Now... I use these 3 totals to work out three more values,
Value 1 is Total 1/Total 2 for this I use
Code:
=(Count([FIELD 1]))/(Sum([FIELD 2]))
Value 2 is where I am stuck at. It should be Total 2/Total 3
I thought I could try this, but it didn't work
Code:
=(Sum([FIELD 2]))/(Sum(IIf([FIELD 3]=True,1,0)))
However, it doesn't seem to like my work (I get an error when trying to run the report)
Data type Mismatch in criteria expression
Any help would be so helpful.