Forum Discussion
DonLarson
Qrew Commander
Andrea,
Updated for that business case and fixed the 1st If Statement.
// Calculate the Vehicles Per Tech. Gives us the Number of Technicians or Zero
var number VehiclesPerTech =If ([Vehicle per technician] = "Yes", ToNumber([No of Technicians],0);
// Calculate the Vehicles Per Crew, Account for TBD in the Number of Technicians. Gives us the Number of Technicians or Zero
var number VehiclesPerCrew = If ([Vehicle per crew] = "Yes" and [No of Technicians]<>"TBD" , ToNumber([No of Crew],0);
// Calculate the Techs Per Vehicle, Account for the case where the denominator is zero
var number TechPerVehicle = if( $VehiclesPerCrew=0, 0, $VehiclesPerTech/$VehiclesPerCrew);
// Control the UI to show a Null Value of the answer is Zero. This is the objective of the formula.
if ( $TechPerVehicle=0,null, $TechPerVehicle)
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
Updated for that business case and fixed the 1st If Statement.
// Calculate the Vehicles Per Tech. Gives us the Number of Technicians or Zero
var number VehiclesPerTech =If ([Vehicle per technician] = "Yes", ToNumber([No of Technicians],0);
// Calculate the Vehicles Per Crew, Account for TBD in the Number of Technicians. Gives us the Number of Technicians or Zero
var number VehiclesPerCrew = If ([Vehicle per crew] = "Yes" and [No of Technicians]<>"TBD" , ToNumber([No of Crew],0);
// Calculate the Techs Per Vehicle, Account for the case where the denominator is zero
var number TechPerVehicle = if( $VehiclesPerCrew=0, 0, $VehiclesPerTech/$VehiclesPerCrew);
// Control the UI to show a Null Value of the answer is Zero. This is the objective of the formula.
if ( $TechPerVehicle=0,null, $TechPerVehicle)
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
AndreaPahor
5 years agoQrew Cadet
Thank you, Don.
------------------------------
Andrea Pahor
------------------------------
------------------------------
Andrea Pahor
------------------------------