[英]Google Data Studio bar chart comparing multiple metrics as % of the total
Let's say I have 10 companies that have signed up to my service, and then dropped off.假设我有 10 家公司注册了我的服务,然后就放弃了。 I want to figure out how many of these companies are hitting milestones of usage in my system, so I want a bar chart that shows the data.
我想弄清楚这些公司中有多少在我的系统中达到了使用里程碑,所以我想要一个显示数据的条形图。 For instance, I have 2 boolean fields on the companies, "Added Card Details" and "Logged in 3 times".
例如,我在公司上有 2 个 boolean 字段,“添加卡详细信息”和“登录 3 次”。
How do I create a bar chart which shows 2 bars, the % of companies which have that value set to "true", as the example below?如何创建显示 2 个条形的条形图,即将该值设置为“true”的公司的百分比,如下例所示?
I'm pulling the data from BigQuery, but here's an example table of data to create the graph from:我从 BigQuery 中提取数据,但这里有一个示例数据表,用于创建图表:
Name![]() |
Added Card Details![]() |
Logged in 3 times![]() |
---|---|---|
Com1 ![]() |
true![]() |
true![]() |
Com2![]() |
true![]() |
true![]() |
Com3![]() |
false![]() |
true![]() |
Com4![]() |
false![]() |
true![]() |
Com5 ![]() |
false![]() |
false![]() |
Com6 ![]() |
false![]() |
false![]() |
Com7![]() |
false![]() |
false![]() |
Com8![]() |
false![]() |
false![]() |
Com9 ![]() |
false![]() |
false![]() |
Com10 ![]() |
false![]() |
false![]() |
Should produce a graph which looks like:应生成如下图:
Thanks in advance.提前致谢。
Here's a sheet with example data and an example graph:这是一张包含示例数据和示例图表的表格:
https://docs.google.com/spreadsheets/d/12jt1ZlhJ-5Hc8XtQsyXVVnLC1F6GOZz9euZkN2y1jNw/edit?usp=sharing https://docs.google.com/spreadsheets/d/12jt1ZlhJ-5Hc8XtQsyXVVnLC1F6GOZz9euZkN2y1jNw/edit?usp=sharing
Here's my attempt at creating the graph.这是我创建图表的尝试。 Not sure where to go from here when Dimension has to be declared and only allows one option.
当必须声明维度并且只允许一个选项时,不确定从这里到 go 的位置。
https://datastudio.google.com/reporting/f9a2db1c-2c32-41b6-8e47-1848e2577417 https://datastudio.google.com/reporting/f9a2db1c-2c32-41b6-8e47-1848e2577417
One approach is to use a CONCAT
field as the dimension and 2 calculated fields in each of the metrics:一种方法是使用
CONCAT
字段作为维度,并在每个指标中使用 2 个计算字段:
Description![]() |
Details![]() |
---|---|
Chart :![]() |
Column Chart![]() |
Dimension 1 :![]() Formula : ![]() |
Actions![]() "Actions" |
Metric 1 :![]() Formula : ![]() Type : ![]() |
Added Card Details![]() COUNT(IF(Added Card Details = "TRUE", Added Card Details, NULL)) / COUNT(Name) Number > Percent ![]() |
Metric 2 :![]() Formula : ![]() Type : ![]() |
Logged in 3 times![]() COUNT(IF(Logged in 3 times = "TRUE", Logged in 3 times, NULL)) / COUNT(Name) Number > Percent ![]() |
Publicly editable Google Data Studio report (embedded Google Sheets data source) and an image elaborate:可公开编辑的Google Data Studio报告(嵌入的Google Sheets数据源)和图片详细说明:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.