Start and End data values

A simpler solution would be to check if any of the values are null before doing the calculation, and if null values are present, handle it in some way.

Example:

# Check if null values are present.
if startVol is not None and endVol is not None and adjVol is not None:

	#If all values are good, perform the calculation
	diffVol = startVol - endVol - adjVol
else:

	#If there are null values, handle it by zeroing the diffVol variable.
	diffVol = 0
1 Like