按年份计算的小计,度量未使用 Power BI 中的切片器更新

Calculated SubTotal By Year, measure not updating with Slicer in Power BI

我有下面的矩阵,其中市场公司名称在矩阵行和切片器中。 我需要计算每年的总额,而不考虑市场公司名称,以便计算“% Distribution”,它等于每个市场公司名称每年的保费除以年度总保费。

我尝试创建以下测试措施:

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]))

它工作得很好,除非我 select 来自切片器的市场公司名称,所有数字都是错误的。

如果我在公式中添加市场公司名称,它将计算每家公司每年的小计,这是错误的:

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]))

感谢您的帮助

乔治

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

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]))

此致, 乔治