Power BI-使用多个表和列的计算列

时间:2019-10-23 07:47:27

标签: calculated-columns powerbi-desktop measure

我需要将财务报表从Excel转移到Power BI Desktop上(该公司尚未在服务版本上设置)。我遇到的一个问题是,使用来自三个表格中六列的数据来计算每月的投资回报率(RoI)图,本质上是总实际收益/支出。

我已经能够创建一种度量来查找“实际总收益”(一个表中的三列和另一表中的两列之和)。

我无法在“按月支出”表(“支出”所在的位置)中获得计算列,以在其计算中使用度量。

我已经向我的管理层建议,只需要一个excel表,其中每个月从报告中复制相关数字,然后导入PowerBI以生成最终报告会更容易,但是他们认为这样做会导致人为错误,并且数据已经存在于PowerBi中,因此他们希望直接从那里进行计算。

Total Benefit Actual = 
sum('Monthly Report Revenue Cumulative'[New Bills Recurring]) +
sum('Monthly Report Revenue Cumulative'[Total One Off Revenue]) +
sum('Monthly Report Revenue Cumulative'[Dom Allowance (Non PE)]) +
sum('Headcount'[Headcount One Off Cml]) +
sum('Headcount'[Headcount Recurring Cml])

我拥有的表和列是:

Table   [Column]
Monthly Report Revenue Cml  [New Bills Recurring]
Monthly Report Revenue Cml  [Total One Off Revenue]
Monthly Report Revenue Cml  [Dom Allowance (Non PE)]
Headcount   [Headcount Recurring Cml]
Headcount   [Headcount One-Off Cml]
Spend by Month  [Spend]

我需要能够按月生成要在图表中使用的RoI列。此公式的excel版本是

=SUM('Monthly Report Revenue Cml'!E2,'Monthly Report Revenue Cml'!F2,'Monthly Report Revenue Cml'!G2,Headcount!E2,Headcount!F2)/'Spend by Month'!E2

所有表都有日期列表,其中第一个在下面(“月份年份”列是转换为MMM-YY格式的日期

Month Year  Year    Quarter Yr Qtr
Jan-16  15/16   4   15/16 Q4
Feb-16  15/16   4   15/16 Q4
Mar-16  15/16   4   15/16 Q4

Total Benefits度量值是已创建表中度量值列表的一部分,因此与任何表都没有直接关系。

谢谢 利亚姆

0 个答案:

没有答案