If some records in one of the fields you used in the expression might have a Null value, you can convert the Null value to zero using the Nz function as shown in the following example:
1	If	if	SCONJ	_	_	15	mark	_	_
2	some	some	DET	IND	_	3	det	_	_
3	records	record	NOUN	PL-NOM	Number=Plur	15	nsubj	_	_
4	in	in	ADP	_	_	5	case	_	_
5	one	one	NUM	CARD-SG	NumType=Card	3	nummod	_	_
6	of	of	ADP	_	_	8	case	_	_
7	the	the	DET	DEF	Definite=Def|PronType=Art	8	det	_	_
8	fields	field	NOUN	PL-NOM	Number=Plur	5	nmod	_	_
9	you	you	PRON	PERS-P2	_	10	nsubj	_	_
10	used	use	VERB	PAST	Mood=Ind|Tense=Past|VerbForm=Fin	8	acl:relcl	_	_
11	in	in	ADP	_	_	13	case	_	_
12	the	the	DET	DEF	Definite=Def|PronType=Art	13	det	_	_
13	expression	expression	NOUN	SG-NOM	Number=Sing	10	obl	_	_
14	might	might	AUX	PAST-AUX	VerbForm=Fin	15	aux	_	_
15	have	have	VERB	INF	VerbForm=Inf	22	advcl	_	_
16	a	a	DET	IND-SG	Definite=Ind|PronType=Art	18	det	_	_
17	Null	null	NOUN	SG-NOM	Number=Sing	18	compound	_	_
18	value	value	NOUN	SG-NOM	Number=Sing	15	obj	_	SpaceAfter=No
19	,	,	PUNCT	Comma	_	15	punct	_	_
20	you	you	PRON	PERS-P2	_	22	nsubj	_	_
21	can	can	AUX	PRES-AUX	VerbForm=Fin	22	aux	_	_
22	convert	convert	VERB	INF	VerbForm=Inf	0	root	_	_
23	the	the	DET	DEF	Definite=Def|PronType=Art	25	det	_	_
24	Null	null	NOUN	SG-NOM	Number=Sing	25	compound	_	_
25	value	value	NOUN	SG-NOM	Number=Sing	22	obj	_	_
26	to	to	ADP	_	_	27	case	_	_
27	zero	zero	NOUN	SG-NOM	Case=Nom	22	obl	_	_
28	using	use	VERB	ING	Tense=Pres|VerbForm=Part	22	advcl	_	_
29	the	the	DET	DEF	Definite=Def|PronType=Art	31	det	_	_
30	Nz	Nz	PROPN	SG-NOM	Number=Sing	31	compound	_	_
31	function	function	NOUN	SG-NOM	Number=Sing	28	obj	_	_
32	as	as	SCONJ	_	_	33	mark	_	_
33	shown	show	VERB	PASS	Tense=Past|VerbForm=Part|Voice=Pass	28	advcl	_	_
34	in	in	ADP	_	_	37	case	_	_
35	the	the	DET	DEF	Definite=Def|PronType=Art	37	det	_	_
36	following	follow	ADJ	ING	Case=Nom	37	amod	_	_
37	example	example	NOUN	SG-NOM	Number=Sing	33	obl	_	SpaceAfter=No
38	:	:	PUNCT	Colon	_	22	punct	_	_
