【问题标题】:Calculated SubTotal By Year, measure not updating with Slicer in Power BI按年份计算小计,测量未使用 Power BI 中的切片器更新
【发布时间】: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


【解决方案1】:

我能够使用以下措施做到这一点:

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]),
                                ALLSELECTED('Production Reinsurer'[Market Company Name]))

问候, 乔治

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-28
    • 1970-01-01
    • 1970-01-01
    • 2021-10-20
    相关资源
    最近更新 更多