added option to use a document value as initial value for a calculation