Get the average number of new data entries per day

Hi guys,

A user publishes between 2 and 10 new data entry per day. I’m looking to calculate the average data entries per day a user publishes and display this average in a text field.

My hypothesis is to do:
(Sum of data entries) / ((days from the first data entry) - (today’s day))

I tried to use this example, but I can’t get my way around it. https://bubble.io/page?type=page&name=timedifference&id=forumapp3&tab=tabs-1

Would love your help,
Cheers.

1 Like

use custom states

state1: dataentries:count
state2: current date - date of first entry
state3: state1/state2

Then your text field should be set to dynamic data equal to state3

Amazing! This is it. I didn’t I could use states for this. Thank you @boston85719, I learned a new thing today :slight_smile:

Here are the screenshots of the solution if that can help anyone with the same issue.

On the text field:

2 Likes