I’m sorry, the code not presented well,
this is the part of the view-model:
self.amountToday = ko.computed({ read: function () { if (self.departments().length > 0) { return self.departments()[0].saleAmountToday(); } }, write: function (value) { //nothing }, owner: self });