Ubidots Community

Cumulative Sum of Variable by Day of the Week

Hi All,

I was wondering if there is a way to set up a synthetic variable by day of the week. I am looking to then make a bar graph that shows the cumulative total of food digested by our machine per day, so we can begin programming our machine to have different techniques per day of the week (and amount of food that it’ll likely be seeing) I created an excel spreadsheet as an example of what we’d like to do. It is pretty simple I just can’t figure out if Ubidots supports a day of the week aspect of synthetic variables…


Yes, you can create a synthetic variable that creates a sum for each day. sum(x, data_range) : Returns the summation of the dots in the specified data_range

More on this page: Analytics: Synthetic Variables Basics | Ubidots Help Center

Hope that helps,


I’d like to have it automatically update the summation of each day of the week, as opposed to specifying a date range. So for example next Monday say they load another 50 lbs, I’d like it to add to the all time Monday total. Using the sum(x, data_range) wouldn’t I have to manually add one each day?

Would I do something along the lines of…

sum(x, "1D", offset=0)

and then

sum(x, "1D", offset=24)

and so on, adding 24 hours for every day of the week?

I may have misunderstood your requirement as I am not sure why you need the offset. Perhaps we could see if someone else might weigh in. Sorry, Chip