In Google Sheets I have data in the range Sheet3!A:C
as pictured below:
I would like to average the values in "Volume (ml)"
(range Sheet3!C:C
), by unique combination of "ID Primary"
and "Date"
.
Below is an example of my expected output based on the sample data above.
Based on your given data, this formula uses Query
and Substitute
to convert the volume data from comma-separated to period-separated decimal and display the average volume per ID and Date
=SORT(ARRAYFORMULA(QUERY({Sheet1!A:B, IFERROR(VALUE(SUBSTITUTE(Sheet1!C:C, ",", ".")))}, "SELECT Col1, Col2, AVG(Col3) WHERE Col1 IS NOT NULL GROUP BY Col1, Col2 LABEL AVG(Col3) 'Average Volume (mL)'",1)), 1, False)
Note: Please adjust the Sheet name accordingly that suits your google sheets