简体   繁体   中英

grouping column in google data studio

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.

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!

This does the trick:

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

Google Data Studio Report and a GIF to elaborate:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM