Hello,
In chapter 1 > lecture part 3 (Bar Chart) I was quite positively surprised it was possible to create a formula such as:
price * (365 - availability.availability_365)
Coming from course M121 (Aggregations) I understand this option is equivalent to $addField. However, in an aggregation pipeline, such a simplfied syntax doesn’t work. Instead, we should write:
$multiply: [
"$price", {$subtract: [
365, "$availability.availability_365"]
}
]
Could you explain why the simplied syntax works in Charts whereas it does not in Aggregations, please?