Combining multiple sheets of data and group by

17 views
Skip to first unread message

prashanti

unread,
Oct 27, 2017, 2:55:43 AM10/27/17
to Google Visualization API
Can someone please hint me what is the problem with this query?

=
Query({Query({Sheet1!$A2:$G,Sheet2!$A2:$H},
"select Col1,Col2,Col3, MULTIPLY(Col7, Col15) where Col1=Col8 and Col3=Col9 group by Col1, Col2, Col3 label MULTIPLY(Col7, Col15) ''")},
"select SUM(Col4) where Col1=" &A2& " and toDate(Col2)= date '"&text(B2,"yyyy-MM-dd")&"' label SUM(Col4) ''")

prashanti

unread,
Oct 27, 2017, 2:58:23 AM10/27/17
to Google Visualization API
The query is being used in a third sheet

prashanti

unread,
Oct 27, 2017, 3:07:33 AM10/27/17
to Google Visualization API
This is the error I am getting

Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered "(" at line 1, column 32. Was expecting one of: <EOF> "where" ... "group" ... "pivot" ... "order" ... "skipping" ... "limit" ... "offset" ... "label" ... "format" ... "options" ... "," ... "*" ... "+" ... "-" ... "/" ... "%" ...     
Reply all
Reply to author
Forward
0 new messages