Thursday, August 29, 2013

Google Spreadsheet Group By Query

Question:

( by Kate Dyer )


I am trying to create a chart with the following format of data:

On one tab, I have a list of items, eg. Chocolate, Strawberry, Vanilla
On another tab, I have a list of names in one column and their flavour preference in the next column, selected from a drop-down that uses validated data from the first tab (i.e. they select Choc/Straw/Vanilla from a drop-down)

I want to have a pie chart populate with how many people chose each flavour. Is this do-able?

[Using Sheets on Mac OS X in Chrome]

Solution:

Have a look at the following screenshot:


I have the data in Column A and B.
And I have the following formula in Cell D1:
=query(A:B;"select B,count(A) where B<>'' group by B label count(A) '' ";0)


I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.


I also take up private and confidential projects:
If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,

No comments:

Post a Comment