I'm using a Raspberry Pi to automatically measure the temperature and humidity in my room and append that data to a Google sheet every few minutes. I use several methods to display the current data (gauges look nice for that) but I haven't found a way to conveniently tell my line chart to only use, for example, the last three days of values.

Is there a nice way of doing this?

Link to my sheet

  • pls, share a copy of your sheet – user0 Jul 5 '19 at 17:51
  • 1
    @user0 I added a link :) – VADS Jul 6 '19 at 19:43

=QUERY('Zimmer WG Fuwa'!A:C; "limit 90 offset "&(COUNTA('Zimmer WG Fuwa'!A:A)-90))


  • for last 3 days it would be:

=QUERY('Zimmer WG Fuwa'!A:C; 
 "where A <= date '"&TEXT(MAX('Zimmer WG Fuwa'!A:A);   "yyyy-MM-dd")&"'
    and A >= date '"&TEXT(MAX('Zimmer WG Fuwa'!A:A)-3; "yyyy-MM-dd")&"'"; 1)

  • This answer was flagged as low-quality because of its length and content. Please describe how this post answers the question. – Rubén Jul 6 '19 at 21:53
  • 1
    Thank you! I tried using the query function before but it didn't work for me for some reason... – VADS Jul 8 '19 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.