grouping column in google data studio

4.1k views Asked by At

I have example data:

customer_list:

Name     suburb
Cersei   king-landing
Jamie    king-landing
Jon      winterfell
Arya     winterfell
Sansa    winterfell
Dany     westeros

in google-data studio, what is the best way if I want to create pie chart based on total people live in suburb.

So, from my example it should be

Winterfell 50% of pie chart
king-landing 33 % of pie chart
westeros     16% of pie chart

I have some research, such as https://datarunsdeep.com.au/blog/custom-content-grouping-data-studio

but it doesnt make sense to me, because we need to create each group. what if I have 1000++ suburbs?

I have just started to look into this product today by the way. Apologise if I don't know too much about this yet.

2

There are 2 answers

0
SRack On

I'm also looking at DataStudio for the first time, so apologies if this is off the mark, but would the following work?

Click 'Add a Metric', then 'Create New Metric' (named whatever you want - for this example a nice intuitive suburb_count) and have this set to COUNT(suburb).

Then, create a pie chart with suburb as the dimension and use the suburb_count as the metric to measure this against?

Hope this gets you in the right direction. Let me know - interested to see if this worked!

0
Nimantha On

This does the trick:

  • Chart Type: Pie Chart
  • Dimension: suburb
  • Metric: suburb (Aggregation: Count)

Google Data Studio Report and a GIF to elaborate: