【发布时间】:2020-06-22 12:58:12
【问题描述】:
我有以下矩阵,其中市场公司名称在矩阵行中以及切片器中。 无论市场公司名称如何,我都需要计算每年的总额,以计算“分配百分比”,它等于每个市场公司名称每年的保费除以年度总保费。
我尝试创建以下测试度量:
test Measure = CALCULATE(SUM('Production Reinsurer'[Gross Written Premium]),
ALLEXCEPT('Production Reinsurer','Production Reinsurer'[Year],
'Production Reinsurer'[Entity Name],
'Production Reinsurer'[Status],
'Production Reinsurer'[Cover Type],
'Production Reinsurer'[LOB]))
效果很好,除非我从切片器中选择市场公司名称,否则所有数字都会出错。
如果我将市场公司名称添加到公式中,它将计算每家公司每年的小计,这是错误的:
test Measure = CALCULATE(SUM('Production Reinsurer'[Gross Written Premium]),
ALLEXCEPT('Production Reinsurer','Production Reinsurer'[Year],
'Production Reinsurer'[Entity Name],
'Production Reinsurer'[Status],
'Production Reinsurer'[Cover Type],
'Production Reinsurer'[LOB],
'Production Reinsurer'[Market Company Name]))
感谢您的帮助
乔治
【问题讨论】:
-
我认为您的测试 Measure 是一个已创建的列?我有一个类似的问题,计算的列无法正确显示我的切片器选择。我通过在创建自定义列之前首先计算特定度量来解决此问题。这可能会帮助您
-
不,它是度量而不是列。
标签: matrix powerbi report dax dashboard