【问题标题】:Google Datastudio multiple repartitions and types chartGoogle Data Studio 多分区和类型图表
【发布时间】:2018-12-03 10:52:59
【问题描述】:

我正在使用 Google Datastudio,但因为一些奇怪的事情而被阻止。

我想制作一个包含全局系列和详细系列的图表。

但要做到这一点,我有 2 个不同的重新分区,但我不知道该怎么做。
这是我的数据集的一个样本:

Type Detail Country Value Date
type1 uk 60 000 2018-12-04
type2 detail-1 uk 15 000 2018-12-04
type2 detail-2 uk 11 000 2018-12-04
type2 detail-3 uk 4 500 2018-12-04
type1 usa 78 000 2018-12-04
type2 detail-1 usa 40 000 2018-12-04
type2 detail-2 usa 17 000 2018-12-04
type2 detail-3 usa 11 5000 2018-12-04

我想要一个基于“类型”的系列和另一个基于“细节”的系列,那么我应该针对不同的国家/地区使用过滤器。

我该怎么做?我花了很多时间在这个简单的问题上,但我无法做到这一点。

我的数据来自 SQL Cloud for MySQL

应该是这样的:

【问题讨论】:

  • 你能给我们举个例子说明你的输出应该是什么样子吗?
  • @Bobbylank 添加到线程 thx

标签: charts series google-data-studio


【解决方案1】:

根据您需要创建和使用第三维的数据

case when Detail is null then Type else Detail end

或者如果 Detail 实际上 = '' 那么

case when Detail = '' then Type else Detail end

或者确定

case when Detail is null or Detail = '' then Type else Detail end

【讨论】:

  • 对不起,我不知道在哪里使用这个查询...?
  • 没问题。创建图表时,您的数据源旁边会在侧面板中显示一个编辑按钮(看起来像铅笔)。单击它,然后在右侧您将看到“添加字段”。选择它,然后输入维度的名称并粘贴到查询中。保存它,它将作为一个维度供您使用。
  • 我没有这支铅笔,我可以点击数据源但不能编辑。
  • 我认为它不是您创建的数据源?所有者需要授予您对数据源的编辑权限,否则所有者将需要创建维度
  • 谢谢!我现在有我想要的了
猜你喜欢
  • 2019-01-15
  • 1970-01-01
  • 1970-01-01
  • 2020-07-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-20
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多