Charts - stop summing data in the same day

I am using line chart to summarise basic numerical data. For example body weight logged. If a client logs a value twice in a day, the values are added together in the chart, clearly not useful for body weight logs. I could look to block multiple entries, but would rather stop glide summing the numbers together and just plot the actual numbers which are logged.

So what value do you expect to see when users log multiple records in a day?

If your x axis is “day” then perhaps the x axis should be a “date time” so that way theyre unique and not totaled?

Otherwise, if you want to prevent users from filling out a form multiple times in one day use a conditional relation (made easier through a query column).

Glide: Conditional Relations (and Relations as Conditions!)

1 Like

Thanks for the reply.
So mine is for a weight lifting app. If someone logged a weight in a day, the for some reason logged it again, maybe the first wasn’t correct or improved later in the day, and logged a second, the charted weight would be double!
I don’t want to add restrictions on what people can log because it shouldn’t be necessary to restrict. I would like it to graph both, or if necessary the average would be more representative or the latest, anything except the sum.

What I would do:

  • On the Logs table, create a query with the conditions below:

User ID/Email is the same as this row > User ID/Email (whatever you used to store the user’s unique info when you create a new record.

Date is within this row > Date (date that the record is logged)

  • Create a rollup over that query to get the average number.

  • Add a rowID column, if you haven’t.

  • Create a single value column to return the first rowID from the query.

  • On the chart, point to the table, filter by rowID being the same as the “single value” column value above, this serves as your “unique” function. Point the value to the average rollup.

1 Like