you must enter at the beginning of your script:
than enter in the Table with the locations:
0 as Fieldname,
or, if you want to preset your Fieldname with a value:
Valuefiled as Fieldname,
Now you can enter in your tablechart or pivottable the new Filedname and use here the expression:
if you want to calculate these values.