1

I receive answers via a Google Forms, which I want to put in a pivot QUERY. I made a query that does the job for all rows, but in the case of duplicate answers, I only want to include rows with the same values in column A, B, and C once.

Here is a sample spreadsheet with the data in the Data sheet, my query in the What I have sheet:

=QUERY(Data!A1:E, "SELECT C, SUM(D) WHERE A IS NOT NULL GROUP BY C PIVOT A",-1)

and what I am asking for in the What I need sheet.

  • After seeing pnuts answer, I now realise that MAX (or MIN) is the aggregation function that I need and not SUM. I do not understand your second question. – Nowak Dec 5 '17 at 17:40
1

MAX instead of SUM should work (at least for your example!).

  • Wow, that makes me feel stupid! :D Then using MIN would also be a solution :) – Nowak Dec 5 '17 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.