Google Sheets Timeshift

I am pulling in data from Google Sheets and I would like to overlay multiple days of power usage over a 24 hour period. Is there an easy way to do this?

Welcome to the Grafana forum.

A few questions to get started:

  • Is your Google Sheets data time-series based?

  • What is the datasource containing the power usage? It is also from Google Sheets or from something else?

  • When you say “overlay”, do you envision something like this? (with different units on the two y-axes)?

  • Can you clarify what you mean by “multiple days of power usage over a 24-hour period”? That statement seems counter intuitive.

Thanks for the reply, sorry for the confusion.
-It is a time based series in Google sheets.
-All of the data is in Google sheets.
-The attached pic might help. Basically I want to compare the last ~7 days of data. So it would be the same unita on the same axis.

Let me know if this makes sense

Thank you for clarifying.

So my gut feeling is that the graph you are seeking is likely possible in Grafana, but definitely out-of-the-norm in that:

  1. The time (x) axis values are NEVER going to change based on the time picker
  2. The 7 lines representing that past 7 days will shift every 24 hours, so either your data or your query needs to be smart enough to do this.

Is there a reason why you are using Grafana for this (and not Google Sheets’ graphing tools)? Grafana is really good for visualizing time series data. Your data does indeed contain time, but you are really looking to have a fixed x-axis (always show 24 hours with a rolling list of the past 7 days represented by each line).

How do you collect the data into Google Sheets? Have you considered a time series database like Influx? This post has average over 24 hours, but you could easily achieve what you you are seeking using a Flux query.

I am just playing around with Grafana to learn more about it. I really like its ability to create nice dashboards. I do have graphs setup in Google sheets as well. Thanks for the info!