Looking to work around with error message "Add_col_to_group_by_or_agg:Col1" from formula below:
Query(Query({data range},"Select etc."), "Select (Col1*Col3)/Sum(Col1)",0)
The inner query Query({data range},"Select etc.")
is working, the output contains 3 columns, with same number of rows, arranged like below:
Col1 | Col2 | Col3
1.00 | 11 | 25
2.00 | 21 | 21
3.00 | 10 | 22,etc.
And I'm looking to wrap this result in another query to using the criteria "Select (Col1*Col3)/Sum(Col1)"
, which unfortunately I cannot get it working.
I've tried it is working totally good if just using partial criteria "Select Col1*Col3"
or "Select Sum(Col1)"
, but when combined the two with the divide, I couldn't get it working, error message as mentioned earlier, "Add_col_to_group_by_or_agg:Col1".
I cannot use =arrayformula
here, because I've to use the Col numbers but not the Col name.