3

Using Google Sheets, is there a way to create charts for only certain rows?

I have created some reports, but when the source list is sorted differently the report breaks because of using the data source as 'SourceTab'!A2:X2. In the source tab I have about 60+ rows, but only want to report on certain rows.

I thought I could add a column to each row to create groupings, then in the chart call those groupings to create the reports.

Community
  • 1
  • 1
Fernan
  • 67
  • 2
  • 7
  • I try this, but the source is a number of columns. So, for say, group 2 the values to be graphed are in the range `H9:CA9` and growing. – Fernan Mar 15 '18 at 20:35
  • And? `=QUERY(myOtherSheet!H9:1000, "select * where ....", 1)` – tehhowch Mar 15 '18 at 20:38
  • it seems I would have to maintain a query for each group of charts. So say out of the 60 rows I want charts by groupings, 1-?... I was hoping there was a way to put the formula in the chart data source and not having to maintain yet another sheet. – Fernan Mar 15 '18 at 20:58
  • With a website/html page you can extract what you desire by defining various [`DataView`](https://developers.google.com/chart/interactive/docs/reference#DataView)s from the same underlying DataTable. https://developers.google.com/chart/interactive/docs/datatables_dataviews – tehhowch Mar 15 '18 at 21:10

2 Answers2

1

add a column to each row to create groupings sounds a good idea. Just create your chart from all available data then filter your data to select only the rows flagged in that column.

pnuts
  • 58,317
  • 11
  • 87
  • 139
0

you can QUERY() them out like this:

=QUERY({2:2; 4:5; 8:8}, "select *", 0)

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124