简体   繁体   English

Google Data Studio 条形图比较多个指标占总数的百分比

[英]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登录 3 次
Com1 Com1 true真的 true真的
Com2通信2 true真的 true真的
Com3通讯3 false错误的 true真的
Com4通讯4 false错误的 true真的
Com5 Com5 false错误的 false错误的
Com6 Com6 false错误的 false错误的
Com7康7 false错误的 false错误的
Com8康8 false错误的 false错误的
Com9 Com9 false错误的 false错误的
Com10 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 :维度 1
Formula :公式
Actions行动
"Actions"
Metric 1 :指标 1
Formula :公式
Type :类型
Added Card Details添加卡详细信息
COUNT(IF(Added Card Details = "TRUE", Added Card Details, NULL)) / COUNT(Name)
Number > Percent数字 > 百分比
Metric 2 :指标 2
Formula :公式
Type :类型
Logged in 3 times登录 3 次
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.

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