【问题标题】:Is it possible to divide each column value of a table by each column value of another table in powerbi?是否可以将表格的每一列值除以powerbi中另一个表格的每一列值?
【发布时间】:2021-01-27 10:19:19
【问题描述】:

我有一个包含以下列的表 A:site_name、monthly_productibility。我还有一个包含以下列的表 B:site_name、monthly_production

我想将monthly_productibility 列(表A)除以monthly_production 列(表B)。

当我尝试 DIVIDE 功能(快速测量或 DAX 功能)时:

DIVIDE(
    SUM('TABLE_B'[monthly_production]),
    COUNTA('TABLE_A'[monthly_productibility]))

结果非常错误,我尝试了不同的公式,但仍然不起作用,我只想在有义务这样做的情况下合并表格(我更喜欢通用方法)。 em>

【问题讨论】:

  • 表格是否相关?两张表的关系如何?
  • 表关系和基数很重要。让我们知道详情。

标签: powerbi dax powerquery powerbi-desktop


【解决方案1】:

试试这个作为tableA中的度量:

test = DIVIDE(SUM(tableA[monthly_productibility]), SUM(TableB[monthly_production]))

【讨论】:

    【解决方案2】:

    我找到了结果,是:

    DIVIDE(
        SUM('TABLE_B'[monthly_production]),
        AVERAGE('TABLE_A'[monthly_productibility]))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-06
      • 2011-08-18
      相关资源
      最近更新 更多