如何根据不相关的其他 table 更改列中的值

How to change value in column based on the other table that is not related

我有一个 table 列 num,其中包含从 10,000 到 1,000,000 的数字。这个table需要作为切片器使用

第二个 Table 每个声明包含 ClaimNumberLossAmount

我如何生成一个新的动态列(或度量)来根据切片器中选择的数字减少每个 ClaimNumber 的 LossAmount。当然,如果损失金额大于 num 列。

例如,如果我选择 40,000,那么 LossAmount 超过 40,000 的所有索赔都需要等于 40,000。

大家看下图,选择40,000 cap Claim5和Claim7就变成了40,000。

有可能实现吗?

您肯定需要将此作为衡量标准,因为计算列无法响应切片器。

措施应该相当简单。

Capped Loss Amount =
VAR MaxLoss = MAX(Slicer[num])
RETURN
SUMX(
    Claims,
    IF(
        Claims[LossAmount] > MaxLoss,
        MaxLoss,
        Claims[LossAmount]
    )
)