I am trying to get calculated fields in my report to work but zero values in the data are throwing up #Div/0! and #Error! and #Num!
The main data fields I am trying to work with are:
My aim is to track mileage and consumption for a fleet of vehicles and show daily and weekly averages in mileage and consumption and then to flag 20% increase in consumption.
I have a calculated field in my report named Kilometers,
and also a calculated field named Consumption,
My sum and average calculation fields in the group footers are only working where there are values above zero in the Kilometer and VehicleLitres and Consumption fields.
In reality there are some days where there has been no travel, so some records will have a zero for the Kilometers field and there are also days when there has been no refueling so there is a zero for the VehicleLitres field.
I have tried using the expression builder to create an IIf function but to no avail.
I have tried copying the syntax suggested by the Expression builder:
«Expr» IIf («expr». «truepart». «falsepart»)
However I keep getting error messages and despite troubleshooting and looking on the internet I can't seem to find a solution to this.