Google Sheets Query Function - Limiting Pivot Columns

55 views
Skip to first unread message

Daniel Hodges

unread,
Nov 6, 2017, 12:28:18 PM11/6/17
to Google Visualization API
Looking for a way to limit the # of columns returned when using the Pivot function within a Query.

For example, here is the query I have:

=QUERY('Raw Data - Oct'!$A:$Q,"select C, SUM(I) where C != '' group by C pivot A",1)

My thoughts were to add a limit to this, but resulted in limiting the # or rows returned. The formula I used was:

=QUERY('Raw Data - Oct'!$A:$Q,"select C, SUM(I) where C != '' group by C pivot A limit 7",1)

No bueno.

Can this be done within the Query function? I am not looking for other formulas to perform this action, unless they can be nested into the query function.

Thanks!
Reply all
Reply to author
Forward
0 new messages