Google Spreadsheet Last X Rows

I use charts in Google Spreadsheet to plot the last 90 days of data. However, when adding new data, it goes beyond the selected range A1: A90. Is there a function that I can use to select the last 90 rows of data in a Google table column?

+4
source share
2 answers

You can create a new sheet and use the QUERY function to get the last 90 lines:

  • If column A is unique and sorted, you simply sort your data in the reverse order and occupy the top 90 rows, and then sort it again: =SORT(QUERY(Sheet1!A:Z,"order by A desc limit 90"),1,1)
  • If this is not the case, you need to calculate the offset by finding the last row and subtracting 90 from it, and then request the data to return 90 rows starting from this offset: =QUERY(Sheet1!A:Z,"limit 90 offset "&(COUNT(Sheet1!A:A)-90))

Then you can use this sheet to create a chart.

+3
source

No, as far as I know, if you did not write your own google script spreadsheet and did not use ranges. script can programmatically feed a chart with data

  • opening table and sheet
  • receiving data
  • eg. last 90 lines
  • feed with this range of chart component
0
source

Source: https://habr.com/ru/post/1494739/


All Articles