Calculate average days

Example: If you have a sales app. And you want to calculate the average number of days from the orders is created to the orders are sent out/finished. Each order have a Created date and a completed date.

Is there any smart way to calculate the average number of days from created to completed of all orders?

hi,

  • add a new number property to your sales collection, call it “# of days”
  • when you close a sale make it update the sale "# of days= current date - start date (don’t worry adalo will convert the difference into days)
  • to see the average: add a text component (magic text> scroll to your sales collection> “# of days” should show up automatically>hover over it and select “average”
    done
1 Like